npm bump #29
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 bump | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| newversion: | |
| description: 'npm version (major minor patch)' | |
| required: true | |
| env: | |
| node_version: lts/* | |
| FORCE_COLOR: 1 | |
| concurrency: # prevent concurrent releases | |
| group: npm-bump | |
| cancel-in-progress: true | |
| jobs: | |
| version_and_release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # fetch full history so things like auto-changelog work properly | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.node_version }} | |
| # setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm i | |
| - run: npm test | |
| - uses: bcomnes/[email protected] | |
| with: | |
| git_email: [email protected] | |
| git_username: ${{ github.actor }} | |
| newversion: ${{ github.event.inputs.newversion }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use. | |
| publish_cmd: npm run release |