Skip to content

Commit 27ab8ba

Browse files
authored
Merge pull request #3 from BitGo/semantic-release
feat: add semantic release versioning
2 parents 992c0ff + 0f0fd6d commit 27ab8ba

4 files changed

Lines changed: 17579 additions & 3 deletions

File tree

.github/workflows/main_ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '!release-do-not-use'
8+
pull_request:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
unit:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
steps:
19+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
22+
with:
23+
node-version: 18
24+
registry-url: https://registry.npmjs.org/
25+
cache: 'npm'
26+
- run: npm i
27+
- run: npm run unit
28+
29+
release:
30+
if: github.repository_owner == 'BitGo' && github.event_name == 'push' && github.ref_name == 'master'
31+
runs-on: ubuntu-latest
32+
needs:
33+
- unit
34+
steps:
35+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
36+
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
37+
with:
38+
node-version: 18
39+
cache: 'npm'
40+
- run: npm ci
41+
- run: ./node_modules/.bin/semantic-release
42+
env:
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
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)