Skip to content

Commit 77fb9bf

Browse files
authored
chore: semantic release (#73)
* chore: semantic release * chore: release yaml * chore: semantic release script * chore: regenerate package-lock
1 parent 016d3be commit 77fb9bf

File tree

5 files changed

+5576
-548
lines changed

5 files changed

+5576
-548
lines changed

.github/workflows/npmpublish.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Release
5+
on:
6+
push:
7+
branches:
8+
- master
9+
- next
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Get npm cache directory
15+
id: npm-cache
16+
run: |
17+
echo "::set-output name=dir::$(npm config get cache)"
18+
- uses: actions/cache@v2
19+
with:
20+
path: ${{ steps.npm-cache.outputs.dir }}
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
- uses: actions/checkout@v2
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: "12"
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Test
34+
run: npm test
35+
36+
- name: Release 🚀
37+
env:
38+
NPM_TOKEN: ${{ secrets.npm_token }}
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: npx semantic-release

.releaserc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"branch": ["master", "next"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/changelog",
6+
"@semantic-release/github",
7+
"@semantic-release/npm",
8+
"@semantic-release/release-notes-generator"
9+
]
10+
}

0 commit comments

Comments
 (0)