chore(release): 3.0.5 #37
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| # Latest release tags, e.g. "v2.0.0" | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| # Beta release tags, e.g. "v3.0.0-beta.1" | |
| - 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' | |
| permissions: | |
| contents: read | |
| jobs: | |
| Install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # https://github.com/actions/checkout/releases/tag/v6.0.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # https://github.com/actions/setup-node/releases/tag/v6.4.0 | |
| with: | |
| node-version-file: .node-version | |
| package-manager-cache: false | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # https://github.com/actions/cache/releases/tag/v5.0.5 | |
| id: cache-node_modules | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - if: steps.cache-node_modules.outputs.cache-hit != 'true' | |
| run: npm ci | |
| publish-npm: | |
| name: Publish to npm | |
| needs: Install | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # https://github.com/actions/checkout/releases/tag/v6.0.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # https://github.com/actions/setup-node/releases/tag/v6.4.0 | |
| with: | |
| node-version-file: .node-version | |
| package-manager-cache: false | |
| registry-url: https://registry.npmjs.org | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # https://github.com/actions/cache/releases/tag/v5.0.5 | |
| id: cache-node_modules | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - run: npm run build | |
| - name: npm publish (latest) | |
| if: ${{ ! contains(github.ref_name, 'beta') }} | |
| run: npm publish --provenance --access public | |
| - name: npm publish (beta) | |
| if: ${{ contains(github.ref_name, 'beta') }} | |
| run: npm publish --provenance --access public --tag beta |