Skip to content

Commit 960cf4d

Browse files
charliedmcbCharlie McBride
andauthored
chore(release): configure semantic-release automation (#433)
* update .releaserc.yaml * add perms to release * add GITHUB_TOKEN * add install of the dev dep * add presetConfig * cat noop * change ordering to cat the file * add --input-type=module * add package.json * add random input * change args * update package.json * remove run * update trigger file again * remove package.json and update release ref * update to locking version 24 (latest) * update release settings to what we want * update settings file to json and add comment --------- Co-authored-by: Charlie McBride <[email protected]>
1 parent b776990 commit 960cf4d

File tree

3 files changed

+63
-11
lines changed

3 files changed

+63
-11
lines changed

.github/workflows/release-trigger.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ on:
88
jobs:
99
generate-sem-ver:
1010
permissions:
11-
contents: read
11+
contents: write
12+
issues: write
13+
pull-requests: write
1214
runs-on: ubuntu-latest
1315
steps:
1416
- name: Harden Runner
@@ -22,5 +24,11 @@ jobs:
2224
with:
2325
node-version: '20.x' # semantic-release requires Node version 20.8.1 or higher
2426
- name: semantic-release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2529
run: |
26-
npx semantic-release@18
30+
npm install conventional-changelog-conventionalcommits -D
31+
# Using the current latest major version of semantic-release v24, to
32+
# prevent automated breaking changes, but still pickup features and patches ASAP.
33+
# Will need to adopt new major versions as they are released.
34+
npx semantic-release@24

.releaserc.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
[
5+
"@semantic-release/commit-analyzer",
6+
{
7+
"preset": "conventionalcommits",
8+
"presetConfig": {
9+
"header": "Changelog",
10+
"types": [
11+
{"type": "feat", "section": "Features"},
12+
{"type": "fix", "section": "Bug Fixes"},
13+
{"type": "chore", "hidden": true},
14+
{"type": "docs", "hidden": true},
15+
{"type": "style", "hidden": true},
16+
{"type": "refactor", "hidden": true},
17+
{"type": "perf", "hidden": true},
18+
{"type": "test", "hidden": true}
19+
],
20+
"preMajor": true
21+
}
22+
}
23+
],
24+
[
25+
"@semantic-release/release-notes-generator",
26+
{
27+
"preset": "conventionalcommits",
28+
"presetConfig": {
29+
"header": "Changelog",
30+
"types": [
31+
{"type": "feat", "section": "Features"},
32+
{"type": "fix", "section": "Bug Fixes"},
33+
{"type": "chore", "hidden": true},
34+
{"type": "docs", "hidden": true},
35+
{"type": "style", "hidden": true},
36+
{"type": "refactor", "hidden": true},
37+
{"type": "perf", "hidden": true},
38+
{"type": "test", "hidden": true}
39+
],
40+
"preMajor": true
41+
}
42+
}
43+
],
44+
[
45+
"@semantic-release/github",
46+
{
47+
"draftRelease": true,
48+
"successComment": false,
49+
"releasedLabels": false
50+
}
51+
]
52+
]
53+
}

.releaserc.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)