Skip to content

Commit 54ddeac

Browse files
committed
[autoSync] CI: support semantic release
1 parent 2caa958 commit 54ddeac

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
if: github.repository_owner == 'alibabacloud-automation' && github.actor == 'shanye997'
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
16+
fetch-depth: 0
17+
18+
- name: Release
19+
uses: cycjimmy/semantic-release-action@v4
20+
with:
21+
semantic_version: 23.0.2
22+
extra_plugins: |
23+
@semantic-release/changelog@6.0.3
24+
@semantic-release/git@10.0.1
25+
conventional-changelog-conventionalcommits@7.0.2
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}

.releaserc.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"branches": [
3+
"main",
4+
"master"
5+
],
6+
"plugins": [
7+
[
8+
"@semantic-release/commit-analyzer",
9+
{
10+
"preset": "conventionalcommits",
11+
"releaseRules": [
12+
{
13+
"type": "docs",
14+
"release": "patch"
15+
}
16+
]
17+
}
18+
],
19+
[
20+
"@semantic-release/release-notes-generator",
21+
{
22+
"preset": "conventionalcommits"
23+
}
24+
],
25+
[
26+
"@semantic-release/github",
27+
{
28+
"successComment": false,
29+
"labels": false,
30+
"releasedLabels": false
31+
}
32+
],
33+
[
34+
"@semantic-release/changelog",
35+
{
36+
"changelogFile": "CHANGELOG.md"
37+
}
38+
],
39+
[
40+
"@semantic-release/git",
41+
{
42+
"assets": [
43+
"CHANGELOG.md"
44+
],
45+
"message": "chore(release): CHANGELOG v${nextRelease.version}"
46+
}
47+
]
48+
]
49+
}

0 commit comments

Comments
 (0)