Files
Yi-Cyuan Chen 59d5441220 ### Added
- GitHub Actions CI across Node.js 18, 20, 22, and 24 against the packed npm artifact
- GitHub Actions publish workflow on release with npm trusted publishing
- `prepack` script to build distributions before `npm pack` / `npm publish`

### Changed
- Replace Travis CI with GitHub Actions
- Update README badges to GitHub Actions, npm, and jsDelivr
- Upgrade mocha and pin vulnerable transitive dependencies via npm overrides
2026-08-07 08:31:31 +08:00

33 lines
640 B
YAML

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