Skip to content

Commit c2739d7

Browse files
committed
ci(release): add semantic-release for automated versioning
Configures semantic-release to run on every push to main, creating GitHub Releases and version tags from conventional commits. Docker workflow already triggers on v*.*.* tags so builds follow automatically.
1 parent 64d5cb1 commit c2739d7

File tree

4 files changed

+6914
-1095
lines changed

4 files changed

+6914
-1095
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
17+
with:
18+
fetch-depth: 0
19+
persist-credentials: false
20+
21+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
22+
with:
23+
node-version: latest
24+
25+
- run: npm ci
26+
27+
- name: Run semantic-release
28+
run: npx semantic-release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
["@semantic-release/npm", { "npmPublish": false }],
7+
[
8+
"@semantic-release/git",
9+
{
10+
"assets": ["package.json", "package-lock.json"],
11+
"message": "chore(release): ${nextRelease.version} [skip ci]"
12+
}
13+
],
14+
"@semantic-release/github"
15+
]
16+
}

0 commit comments

Comments
 (0)