Skip to content

Commit ed67721

Browse files
ci: add semantic release
1 parent 5d38def commit ed67721

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Semantic Releases
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
issues: write
10+
packages: write
11+
statuses: write
12+
13+
jobs:
14+
run:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Setup Configuration
23+
run: |
24+
if [ -n "$GH_TOKEN_SECRET" ]; then
25+
echo "GH_TOKEN=$GH_TOKEN_SECRET" >> $GITHUB_ENV
26+
else
27+
echo "GH_TOKEN=$GITHUB_TOKEN" >> $GITHUB_ENV
28+
fi
29+
env:
30+
GH_TOKEN_SECRET: ${{ secrets.GH_TOKEN }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 'lts/*'
37+
38+
- name: Semantic Release
39+
uses: cycjimmy/semantic-release-action@9cc899c47e6841430bbaedb43de1560a568dfd16
40+
env:
41+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.releaserc.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"branches": [
3+
"main",
4+
"master",
5+
"*.x"
6+
],
7+
"plugins": [
8+
"@semantic-release/commit-analyzer",
9+
"@semantic-release/release-notes-generator",
10+
[
11+
"@semantic-release/changelog",
12+
{
13+
"changelogFile": "CHANGELOG.md"
14+
}
15+
],
16+
[
17+
"@semantic-release/git",
18+
{
19+
"assets": [
20+
"CHANGELOG.md"
21+
]
22+
}
23+
],
24+
"@semantic-release/github"
25+
]
26+
}

0 commit comments

Comments
 (0)