-
Notifications
You must be signed in to change notification settings - Fork 11
40 lines (33 loc) · 978 Bytes
/
publish.yml
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
# Version tags only
name: Publish
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
env:
FORCE_COLOR: 1
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Retrieve node_modules from cache
uses: actions/cache@v1
with:
path: node_modules
key: node-modules-v14-${{ runner.os }}-refs/heads/master-${{ hashFiles('package.json') }}
- name: Retrieve src/node_modules from cache
uses: actions/cache@v1
with:
path: src/node_modules
key: src/node-modules-v14-${{ runner.os }}-refs/heads/master-${{ hashFiles('src/package*.json') }}
- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Publish new version
env:
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
run: npm run publish