Skip to content

Commit d09b90b

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 9fb8f41 commit d09b90b

4 files changed

Lines changed: 4507 additions & 122 deletions

File tree

.github/workflows/main_ci.yml

Lines changed: 22 additions & 0 deletions
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
jobs:
@@ -67,3 +68,24 @@ jobs:
6768
registry-url: https://registry.npmjs.org/
6869
- run: npm ci
6970
- run: npm run lint
71+
release:
72+
if: github.repository_owner == 'BitGo' && github.event_name == 'push' && github.ref_name == 'master'
73+
runs-on: ubuntu-latest
74+
needs:
75+
- audit
76+
- unit
77+
- coverage
78+
- format
79+
- gitdiff
80+
- lint
81+
steps:
82+
- uses: actions/checkout@v3
83+
- uses: actions/setup-node@v3
84+
with:
85+
node-version: 14
86+
cache: 'npm'
87+
- run: npm ci
88+
- run: ./node_modules/.bin/semantic-release
89+
env:
90+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

Lines changed: 21 additions & 0 deletions
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)