|
| 1 | +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages |
| 3 | + |
| 4 | +name: Publish NPM package |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + - master |
| 11 | + |
| 12 | +jobs: |
| 13 | + publish-npm: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - uses: actions/setup-node@v2 |
| 18 | + with: |
| 19 | + node-version: 18 |
| 20 | + registry-url: https://registry.npmjs.org/ |
| 21 | + - run: npm i |
| 22 | + - run: npx semantic-release |
| 23 | + env: |
| 24 | + NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
| 25 | + GH_TOKEN: ${{secrets.GH_TOKEN}} |
0 commit comments