Skip to content

chore(release): 1.2.3 #14

chore(release): 1.2.3

chore(release): 1.2.3 #14

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org
- run: npm install -g npm@latest
- run: npm install
- run: npm publish --provenance
- name: Extract changelog
run: |
VERSION=${GITHUB_REF#refs/tags/v}
awk -v ver="$VERSION" '
$0 ~ /^##+ \[/ && index($0, "[" ver "]") { found=1; next }
found && $0 ~ /^##+ \[/ { exit }
found { print }
' CHANGELOG.md > /tmp/release-notes.md
if ! grep -q '[^[:space:]]' /tmp/release-notes.md; then
echo "No changelog entry found for v$VERSION" >&2
exit 1
fi
- uses: softprops/action-gh-release@v2
with:
body_path: /tmp/release-notes.md