Set up GitHub release action / provenance #46

This commit is contained in:
Yi-Cyuan Chen
2026-07-18 18:14:15 +08:00
parent 6755b755cc
commit 03f78b8bb0
2 changed files with 33 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Publish
on:
release:
types: [published]
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: https://registry.npmjs.org
package-manager-cache: false
- run: npm ci
- name: Verify release version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
test "$GITHUB_REF_NAME" = "v$PACKAGE_VERSION"
- run: npm run build
- run: npm test
- run: npm publish
+1
View File
@@ -3,6 +3,7 @@
## v0.12.0 / 2026-07-18
### Added
- support ESM #44
- Set up GitHub release action / provenance #46
### Fixed
- Fix uploading coverage to coveralls #52