Skip to content

Commit 8f1552e

Browse files
committed
feat(semantic-release): add workflow
1 parent 1ab94f3 commit 8f1552e

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
23+
with:
24+
cache: npm
25+
node-version: lts/*
26+
- run: npm clean-install
27+
- run: npm install --global corepack@latest
28+
- run: corepack npm audit signatures
29+
- run: npx semantic-release
30+
env:
31+
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)