Skip to content

Commit 409cd14

Browse files
committed
feat(semantic-release): add workflow for semantic-release
1 parent a8d9779 commit 409cd14

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
"on":
3+
push:
4+
branches:
5+
- main
6+
- next
7+
- beta
8+
- "*.x"
9+
permissions:
10+
contents: read # for checkout
11+
jobs:
12+
release:
13+
permissions:
14+
contents: write # to be able to publish a GitHub release
15+
issues: write # to be able to comment on released issues
16+
pull-requests: write # to be able to comment on released pull requests
17+
id-token: write # to enable use of OIDC for npm provenance
18+
name: release
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Semantic Release
24+
uses: cycjimmy/semantic-release-action@v4
25+
with:
26+
tag_format: ${version}
27+
branches: |
28+
['main', 'next']
29+
extra_plugins: |
30+
@semantic-release/commit-analyzer
31+
@semantic-release/release-notes-generator
32+
@semantic-release/github
33+
@semantic-release/changelog
34+
@semantic-release/git
35+
conventional-changelog-conventionalcommits
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"tagFormat": "${version}",
3+
"branches": ["main", "next"],
4+
"plugins": [
5+
[
6+
"@semantic-release/commit-analyzer", {
7+
"preset": "conventionalcommits",
8+
}
9+
],
10+
[
11+
"@semantic-release/release-notes-generator", {
12+
"preset": "conventionalcommits",
13+
}
14+
],
15+
[
16+
"@semantic-release/github",
17+
{
18+
"labels": "semantic-release,bot"
19+
}
20+
],
21+
[
22+
"@semantic-release/changelog",
23+
{
24+
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines."
25+
}
26+
],
27+
[
28+
"@semantic-release/git",
29+
{
30+
"message": "chore(release): version ${nextRelease.version} \n\n${nextRelease.notes}"
31+
}
32+
]
33+
]
34+
}

0 commit comments

Comments
 (0)