Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/create-release.yml

This file was deleted.

17 changes: 9 additions & 8 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ on:
release:
types:
- published
- created
- edited
- released
workflow_dispatch:

permissions:
id-token: write
contents: read
id-token: write

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm install -g npm@latest
- run: npm ci
- run: npm test
- run: unset NODE_AUTH_TOKEN && npm publish --ignore-scripts
- run: npm run build
- run: |
TAG=$(node -p "require('./package.json').version.includes('-') ? 'beta' : 'latest'")
npm publish --provenance --ignore-scripts --tag $TAG

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"test": "nyc mocha test/**/*Test.js",
"posttest": "nyc report --reporter=html --reporter=lcov",
"eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check",
"precommit": "lint-staged"
"precommit": "lint-staged",
"gh:release": "gh release create v$npm_package_version --generate-notes --verify-tag --target master",
"gh:prerelease": "gh release create v$npm_package_version --prerelease --generate-notes --verify-tag --target master"
},
"lint-staged": {
"*.js": [
Expand Down