2.0.4 #14
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: | |
| # This job runs when a new release is published | |
| release: | |
| types: [published] | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
| # Store the name of the release | |
| # See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | |
| - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| # Ensure npm 11.5.1 or later for trusted publishing | |
| - run: npm install -g npm@latest | |
| - run: npm i | |
| - run: npm run build | |
| - run: npm version $RELEASE_VERSION --no-git-tag-version | |
| - run: npm publish --access public --tag=latest |