Skip to content

Commit 3ee9d8e

Browse files
committed
fix: use git in semantic-release with commit message
1 parent 93d9e1c commit 3ee9d8e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11-
if: github.event_name == 'push' && github.ref == 'refs/heads/main' # make sure it only run on main
11+
# make sure it only run on main and ensure that it does not contain [skip ci] in the commit message
12+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]')
1213
permissions:
1314
contents: write # to be able to publish a GitHub release
1415
issues: write # to be able to comment on released issues

.releaserc

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"@semantic-release/commit-analyzer",
55
"@semantic-release/release-notes-generator",
66
"@semantic-release/github",
7-
"@semantic-release/npm"
7+
"@semantic-release/npm",
8+
[
9+
"@semantic-release/git",
10+
{
11+
"assets": ["CHANGELOG.md", "package.json"],
12+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
13+
}
14+
]
815
]
916
}

0 commit comments

Comments
 (0)