ci: add release

This commit is contained in:
Diego Rodriguez Baquero 2021-06-14 20:47:25 -05:00
parent 07beac4aa4
commit 401fdcdc60
No known key found for this signature in database
GPG Key ID: 6B27C0E5443D1E77
2 changed files with 41 additions and 0 deletions

36
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm i
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

View File

@ -47,7 +47,9 @@
"ws": "^7.4.5"
},
"devDependencies": {
"@webtorrent/semantic-release-config": "^1.0.5",
"magnet-uri": "6.2.0",
"semantic-release": "^17.4.3",
"standard": "*",
"tape": "5.2.2",
"webtorrent-fixtures": "1.7.3",
@ -98,5 +100,8 @@
"extends": [
"github>webtorrent/renovate-config"
]
},
"release": {
"extends": "@webtorrent/semantic-release-config"
}
}