diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 0000000..e597839 --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,29 @@ +name: Publish to Private NPM Registry + +on: + push: + tags: + - "v*" # Trigger on tags like v1.0.0, v2.3, etc. + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://npm.personalnas.com/" + + - name: Install dependencies + run: npm ci + + - name: Publish to private registry + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm publish --registry=https://npm.personalnas.com/