From 66d43d006bff728a066b45cfd27d37fb5e96caa2 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Thu, 20 Feb 2025 10:56:02 +1100 Subject: [PATCH] ci: add Gitea Actions workflow for publishing to npm --- .gitea/publishToNpm.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/publishToNpm.yaml diff --git a/.gitea/publishToNpm.yaml b/.gitea/publishToNpm.yaml new file mode 100644 index 0000000..3d280a6 --- /dev/null +++ b/.gitea/publishToNpm.yaml @@ -0,0 +1,31 @@ +name: Publish to npm + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + registry-url: 'https://registry.npmjs.org/' + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}