Skip to content

Commit a391a8a

Browse files
committed
ci: semantic release
1 parent 2219662 commit a391a8a

File tree

4 files changed

+18025
-5917
lines changed

4 files changed

+18025
-5917
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Release
11+
12+
runs-on: ubuntu-latest
13+
if: "!contains(github.event.head_commit.message, 'chore(release)')"
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
# required to use our own personal access token
22+
# we need to use a custom PAT as other workflows
23+
# aren't triggered using secrets.GITHUB_TOKEN
24+
persist-credentials: false
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: 18
30+
31+
- name: Install dependencies
32+
run: npm install
33+
34+
- name: Release
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
run: npx semantic-release

.releaserc

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

0 commit comments

Comments
 (0)