File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 tags :
66 - " v*.*.*"
77
8+ permissions :
9+ contents : write
10+
811jobs :
9- publish :
10- name : publish to npm
12+ github-release :
13+ name : create GitHub release
1114 runs-on : ubuntu-latest
12- permissions :
13- contents : read
14- id-token : write
1515 steps :
1616 - uses : actions/checkout@v4
17+
1718 - uses : pnpm/action-setup@v4
1819 with :
1920 version : 10
21+
2022 - uses : actions/setup-node@v4
2123 with :
2224 node-version : " 20"
23- registry-url : " https://registry.npmjs.org"
2425 cache : pnpm
2526
2627 - name : Install
3233 - name : Build
3334 run : pnpm build
3435
35- - name : Verify package matches tag
36+ - name : Verify package version matches tag
3637 run : |
3738 PKG_VERSION=$(node -p "require('./package.json').version")
3839 TAG_VERSION="${GITHUB_REF_NAME#v}"
4142 exit 1
4243 fi
4344
44- - name : Publish to npm
45- run : pnpm publish --access public --no-git-checks --provenance
46- env :
47- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
45+ - name : Create GitHub release
46+ uses : softprops/action-gh-release@v2
47+ with :
48+ generate_release_notes : true
Original file line number Diff line number Diff line change @@ -42,9 +42,18 @@ Conventional commits are nice but not enforced. A short imperative summary is fi
4242
4343## Releasing (maintainers)
4444
45- 1 . Bump ` version ` in ` package.json ` .
46- 2 . Push a ` vX.Y.Z ` tag.
47- 3 . The ` release.yml ` workflow runs the tests and publishes to npm.
45+ 1 . Bump ` version ` in ` package.json ` and commit to ` main ` .
46+ 2 . Push a ` vX.Y.Z ` tag — CI runs tests and creates the [ GitHub Release] ( https://github.com/false200/Tooltrim/releases ) .
47+ 3 . Publish to npm locally (not from CI):
48+
49+ ``` bash
50+ pnpm install
51+ pnpm test
52+ pnpm build
53+ pnpm publish --access public
54+ ```
55+
56+ You must be logged in to npm (` npm login ` ) and own the ` tooltrim ` package.
4857
4958## Reporting issues
5059
You can’t perform that action at this time.
0 commit comments