Skip to content

release: v0.2.2

release: v0.2.2 #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
release:
name: Publish to npm + GitHub Release
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
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 with provenance
run: npm publish --access public --provenance
- 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