mirror of
https://github.com/emn178/js-sha1.git
synced 2026-11-17 22:28:43 +08:00
- ESM builds and package `exports`. ### Fixed - Incorrect hash for strings with unpaired UTF-16 surrogates; they are now encoded as U+FFFD, the same as `TextEncoder`. - Detect browsers with a `process` polyfill (e.g. BrowserFS) and Electron renderers as non-Node.js environments. ### Changed - Replace Travis CI with GitHub Actions. - Update dev dependencies and fix security issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
653 B
YAML
33 lines
653 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 --provenance
|