Skip to content

Commit db47481

Browse files
ci: enable semantic-release
Configure semantic-release to push release candidates on every push to master. The release will push an npm package to the @bitgo-forks scope on npm. Ticket: BG-66106
1 parent ec0eb7c commit db47481

File tree

4 files changed

+4062
-94
lines changed

4 files changed

+4062
-94
lines changed

.github/workflows/main_ci.yml

+25
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- '!release-do-not-use'
78
pull_request:
89

910
permissions:
@@ -124,3 +125,27 @@ jobs:
124125
cache: 'npm'
125126
- run: npm ci
126127
- run: npm run lint:tests
128+
129+
release:
130+
if: github.repository_owner == 'BitGo' && github.event_name == 'push' && github.ref_name == 'master'
131+
runs-on: ubuntu-latest
132+
needs:
133+
- unit
134+
- integration
135+
- audit
136+
- coverage
137+
- format
138+
- gitdiff
139+
- lint
140+
- lint-tests
141+
steps:
142+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
143+
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
144+
with:
145+
node-version: 16
146+
cache: 'npm'
147+
- run: npm ci
148+
- run: ./node_modules/.bin/semantic-release
149+
env:
150+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
151+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"branches": [
3+
"release-do-not-use",
4+
{
5+
"name": "master",
6+
"prerelease": true,
7+
"channel": "rc"
8+
}
9+
],
10+
"plugins": [
11+
"@semantic-release/commit-analyzer",
12+
"@semantic-release/release-notes-generator",
13+
"@semantic-release/npm",
14+
[
15+
"@semantic-release/github",
16+
{
17+
"failComment": false
18+
}
19+
]
20+
]
21+
}

0 commit comments

Comments
 (0)