-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (74 loc) · 2.16 KB
/
test.yml
File metadata and controls
83 lines (74 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: npm test
on:
push:
branches:
- master
- main
# temporary disable until build workflow is configured properly
# branches-ignore:
# - '**'
paths:
#- 'dist/**'
- '**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
node-version:
#- 10.x
- 12.x
- 14.x
include:
#- node-version: 10.x
# region: "us-east-1"
- node-version: 12.x
region: "us-east-1"
- node-version: 14.x
region: "us-east-2"
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
# peer dependency
#- run: npm install aws-sdk
#- run: npm run build --if-present
-
shell: bash
run: CI=true npm test
env:
AWS_ACCESS_KEY_ID: AKIAWS5577QLD5TL6AZN
AWS_SECRET_ACCESS_KEY: ${{ secrets.KEYSECRET_AKIAWS5577QLD5TL6AZN }}
AWS_REGION: ${{ matrix.region }}
CI: true
tag:
name: Tag
needs: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: Klemensas/action-autotag@stable
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
#tag_suffix: " (beta)"
#tag_message: "Custom message goes here."
# publish if the version number in package.json differs from the latest on NPM
publish:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public