Skip to content

Commit 24ac727

Browse files
committed
ci: add semantic-release
1 parent a73c5cf commit 24ac727

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- 'test-*'
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '7'
20+
- name: Install dependencies
21+
run: npm install
22+
- name: Build
23+
run: npm run build
24+
- name: Release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
run: npx semantic-release

.releaserc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
branches: [
3+
{name: 'main'},
4+
{name: 'test-*', prerelease: true},
5+
]
6+
}

0 commit comments

Comments
 (0)