release: v0.2.18 #19
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: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Publish to npm + GitHub Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - name: Sync spec docs into templates | |
| run: node scripts/sync-docs.js | |
| - name: Install deps | |
| run: npm ci | |
| - name: Publish to npm | |
| run: NODE_AUTH_TOKEN="" npm publish | |
| - name: Generate changelog from commits | |
| id: changelog | |
| run: | | |
| PREV_TAG=$(git tag --sort=-v:refname | sed -n '2p') | |
| if [ -z "$PREV_TAG" ]; then | |
| LOG=$(git log --pretty=format:"- %s (%h)" HEAD) | |
| else | |
| LOG=$(git log --pretty=format:"- %s (%h)" "$PREV_TAG"..HEAD) | |
| fi | |
| echo "log<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$LOG" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: | | |
| ## Changes | |
| ${{ steps.changelog.outputs.log }} | |
| generate_release_notes: true |