Release #7
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: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Tag to release (e.g. v0.0.0-test)' | ||
| required: true | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| jobs: | ||
| test: | ||
| uses: ./.github/workflows/tests.yml | ||
|
Check failure on line 19 in .github/workflows/release.yml
|
||
| publish: | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Ensure tag exists (manual run) | ||
| if: github.event_name == 'workflow_dispatch' | ||
| run: | | ||
| git tag ${{ inputs.tag }} | ||
| git push origin ${{ inputs.tag }} | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| registry-url: 'https://registry.npmjs.org' | ||
| - run: npm ci | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| tag_name: ${{ inputs.tag || github.ref_name }} | ||
| generate_release_notes: true | ||
| - run: npm publish --provenance --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||