Bump Version #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: NPM Publish | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| # This will only publish if the package.json version has changed | |
| - name: Check version changes | |
| uses: EndBug/version-check@v2 # More info about the arguments on the action page | |
| id: check # This will be the reference for later | |
| with: | |
| file-url: https://unpkg.com/bungie-api-ts@latest/package.json | |
| static-checking: localIsNew | |
| - uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| if: steps.check.outputs.changed == 'true' | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version-file: '.nvmrc' | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Publish the package to NPM | |
| if: steps.check.outputs.changed == 'true' | |
| run: cd lib && npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NPM will automatically authenticate with this |