Skip to content

Commit 8e3bb62

Browse files
authored
chore: replace standard-version with changelogen (#227)
[standard-version](https://www.npmjs.com/package/standard-version) has been deprecated for a while. [changelogen](https://github.com/unjs/changelogen) seems like a promising replacement from the unjs ecosystem. Tested this workflow in some of my other packages and LGTM
1 parent 338dc87 commit 8e3bb62

File tree

4 files changed

+1078
-1095
lines changed

4 files changed

+1078
-1095
lines changed

.github/workflows/publish.yml

-9
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,8 @@ jobs:
2727
- name: Build
2828
run: yarn build
2929

30-
- name: Generate Release Body
31-
run: npx extract-changelog-release > RELEASE_BODY.md
32-
3330
- name: Publish to NPM
3431
run: yarn npm publish
3532
env:
3633
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3734
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38-
39-
- name: Create GitHub Release
40-
uses: ncipollo/release-action@v1
41-
with:
42-
bodyFile: "RELEASE_BODY.md"
43-
token: ${{ secrets.GITHUB_TOKEN }}

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,13 @@ import "normally-transformed"; // This will remain 'normally-transformed', even
200200
## Project Guidelines for Contributors
201201

202202
- Package Manager: `yarn` (`yarn install`)
203+
- Format before commit: `prettier` (`yarn format`)
203204
- Commit messages: [Conventional Commit Specs](https://www.conventionalcommits.org/en/v1.0.0/)
204-
- Format before commit: `prettier` (`yarn run format`)
205-
- Releases: `standard-version` (`yarn run release`)
205+
- Releases: `changelogen` (`yarn release`)
206+
207+
```shell
208+
GH_TOKEN=$(gh auth token) yarn release
209+
```
206210

207211
## Alternatives
208212

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"compile": "tsc",
99
"build": "rm -rf dist && yarn run clean && yarn run compile",
1010
"test": "yarn test/ install && yarn test/ add-package && yarn test/ test",
11-
"release": "standard-version",
11+
"release": "changelogen --release --push",
1212
"--------------": "",
1313
"format": "prettier --write .",
1414
"clean": "rm -rf dist \"**/*.tsbuildinfo\" ./test/projects/nx/dist",
@@ -58,8 +58,8 @@
5858
"@types/node": "^18.19.43",
5959
"@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5",
6060
"@types/ts-node": "npm:ts-node@^10.9.2",
61+
"changelogen": "^0.5.5",
6162
"prettier": "^3.3.3",
62-
"standard-version": "^9.5.0",
6363
"ts-patch": "^3.2.1",
6464
"typescript": "^5.5.4"
6565
},

0 commit comments

Comments
 (0)