Skip to content

Commit 401fdcd

Browse files
author
Diego Rodriguez Baquero
committed
ci: add release
1 parent 07beac4 commit 401fdcd

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
persist-credentials: false
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 14
21+
- name: Cache
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-npm-
28+
- name: Install dependencies
29+
run: npm i
30+
env:
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
- name: Release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
run: npx semantic-release

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
"ws": "^7.4.5"
4848
},
4949
"devDependencies": {
50+
"@webtorrent/semantic-release-config": "^1.0.5",
5051
"magnet-uri": "6.2.0",
52+
"semantic-release": "^17.4.3",
5153
"standard": "*",
5254
"tape": "5.2.2",
5355
"webtorrent-fixtures": "1.7.3",
@@ -98,5 +100,8 @@
98100
"extends": [
99101
"github>webtorrent/renovate-config"
100102
]
103+
},
104+
"release": {
105+
"extends": "@webtorrent/semantic-release-config"
101106
}
102107
}

0 commit comments

Comments
 (0)