Skip to content

Commit 6356370

Browse files
committed
build: get code ready for publishing
1 parent 3e501bc commit 6356370

File tree

4 files changed

+5277
-359
lines changed

4 files changed

+5277
-359
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
name: Test on node ${{ matrix.node }} and ${{ matrix.os }}
11+
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
node: [8, 10, 12]
17+
os:
18+
- ubuntu-latest
19+
- windows-latest
20+
- macOS-latest
21+
22+
steps:
23+
- name: Preserve line endings
24+
run: git config --global core.autocrlf false
25+
- name: Checkout
26+
uses: actions/checkout@v1
27+
- name: Setup Node
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node }}
31+
- name: Install & test/cover
32+
run: npm ci && npm run cover
33+
env:
34+
CI: true
35+
36+
release:
37+
name: npm publish / GitHub release
38+
needs: test
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v1
43+
- name: Setup Node
44+
uses: actions/setup-node@v1
45+
with:
46+
node-version: 12
47+
registry-url: https://registry.npmjs.org/
48+
- name: Install
49+
env:
50+
CI: true
51+
run: npm ci
52+
- name: Build
53+
if: success()
54+
run: npm run build
55+
- name: Semantic Release
56+
if: success()
57+
env:
58+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
run: npx semantic-release

.releaserc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
"extends": "@jedmao/semantic-release-npm-github-config",
3+
"branch": "master"
4+
}

0 commit comments

Comments
 (0)