Skip to content

Commit d0e6e92

Browse files
committed
chore(ci): Set up semantic-release
1 parent eeb308f commit d0e6e92

File tree

5 files changed

+12825
-2666
lines changed

5 files changed

+12825
-2666
lines changed

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- next
7+
- next-major
8+
- beta
9+
- alpha
10+
11+
permissions:
12+
contents: read # for checkout
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write # to be able to publish a GitHub release
20+
issues: write # to be able to comment on released issues
21+
pull-requests: write # to be able to comment on released pull requests
22+
id-token: write # to enable use of OIDC for npm provenance
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: 18
32+
- name: Install dependencies
33+
run: npm clean-install
34+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
35+
run: npm audit signatures
36+
- name: Release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
run: npx semantic-release

.releaserc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"branches": [
3+
"+([0-9])?(.{+([0-9]),x}).x",
4+
"main",
5+
"next",
6+
"next-major",
7+
{ "name": "beta", "prerelease": true },
8+
{ "name": "alpha", "prerelease": true }
9+
],
10+
"plugins": [
11+
"@semantic-release/commit-analyzer",
12+
"@semantic-release/release-notes-generator",
13+
"@semantic-release/npm",
14+
"@semantic-release/github",
15+
"@semantic-release/git"
16+
]
17+
}

0 commit comments

Comments
 (0)