Skip to content

Commit 2b2de1d

Browse files
authored
chore(cd): Release workflow (#6)
1 parent 17f93f9 commit 2b2de1d

File tree

4 files changed

+2668
-46
lines changed

4 files changed

+2668
-46
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: release
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
uses: ./.github/workflows/ci.yml
16+
17+
release:
18+
runs-on: ubuntu-latest
19+
needs: build
20+
permissions:
21+
contents: write
22+
issues: write
23+
pull-requests: write
24+
id-token: write
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version-file: .nvmrc
31+
cache: yarn
32+
- run: yarn install --immutable
33+
- run: yarn build
34+
- run: yarn release
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json.schemastore.org/semantic-release",
3+
"branches": ["main"],
4+
"plugins": [
5+
"@semantic-release/commit-analyzer",
6+
"@semantic-release/release-notes-generator",
7+
"semantic-release-yarn",
8+
"@semantic-release/github"
9+
]
10+
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"check": "yarn compile && yarn lint && yarn test",
2929
"compile": "tsc",
3030
"lint": "eslint . --report-unused-disable-directives",
31+
"release": "semantic-release",
3132
"test": "NODE_ENV=test mocha"
3233
},
3334
"packageManager": "yarn@4.0.2",
@@ -61,6 +62,8 @@
6162
"react": "18.2.0",
6263
"react-native": "^0.73.2",
6364
"react-test-renderer": "^18.2.0",
65+
"semantic-release": "^23.0.0",
66+
"semantic-release-yarn": "^3.0.2",
6467
"sinon": "^17.0.1",
6568
"ts-node": "^10.9.2",
6669
"tslib": "^2.6.2",

0 commit comments

Comments
 (0)