diff --git a/.github/workflopublish.yml b/.github/workflopublish.yml new file mode 100644 index 0000000..f2d6501 --- /dev/null +++ b/.github/workflopublish.yml @@ -0,0 +1,33 @@ +### GitHub Actions Workflow (`publish.yml`) + +Save the following configuration in a `.github/workflows/publish.yml` file in your repository: + +```yaml +name: Publish to npm + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + registry-url: 'https://registry.npmjs.org/' + + - name: Install dependencies + run: npm install + + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}