Skip to content

Commit

Permalink
chore(release): configure semantic-release automation (#433)
Browse files Browse the repository at this point in the history
* 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 <Charlie.McBride@microsoft.com>
  • Loading branch information
charliedmcb and Charlie McBride authored Jul 12, 2024
1 parent b776990 commit 960cf4d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 11 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
jobs:
generate-sem-ver:
permissions:
contents: read
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Harden Runner
Expand All @@ -22,5 +24,11 @@ jobs:
with:
node-version: '20.x' # semantic-release requires Node version 20.8.1 or higher
- name: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release@18
npm install conventional-changelog-conventionalcommits -D
# Using the current latest major version of semantic-release v24, to
# prevent automated breaking changes, but still pickup features and patches ASAP.
# Will need to adopt new major versions as they are released.
npx semantic-release@24
53 changes: 53 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"presetConfig": {
"header": "Changelog",
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "chore", "hidden": true},
{"type": "docs", "hidden": true},
{"type": "style", "hidden": true},
{"type": "refactor", "hidden": true},
{"type": "perf", "hidden": true},
{"type": "test", "hidden": true}
],
"preMajor": true
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"header": "Changelog",
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "chore", "hidden": true},
{"type": "docs", "hidden": true},
{"type": "style", "hidden": true},
{"type": "refactor", "hidden": true},
{"type": "perf", "hidden": true},
{"type": "test", "hidden": true}
],
"preMajor": true
}
}
],
[
"@semantic-release/github",
{
"draftRelease": true,
"successComment": false,
"releasedLabels": false
}
]
]
}
9 changes: 0 additions & 9 deletions .releaserc.yaml

This file was deleted.

0 comments on commit 960cf4d

Please sign in to comment.