Skip to content

Commit 3fa532e

Browse files
authored
Merge pull request #122 from amadeus4dev/github-actions
Migrate to Github actions
2 parents 99f477d + fa27794 commit 3fa532e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
jobs:
8+
build:
9+
runs-on: Ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
node-version: [10, 12.16.3, 14]
14+
name: Node ${{ matrix.node-version }} sample
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Node ${{ matrix.nodeversion }}
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
registry-url: 'https://registry.npmjs.org'
22+
- name: Install dependencies
23+
run: npm install
24+
- name: Testing
25+
run: npm test
26+
- name: Before deploy
27+
run: npm run docs
28+
- name: Publish
29+
if: ${{ matrix.node-version == '12.16.3' }}
30+
run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)