-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (88 loc) · 2.81 KB
/
release.yml
File metadata and controls
89 lines (88 loc) · 2.81 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
84
85
86
87
88
89
# ==========================
#
# THIS IS A GENERATED FILE. Don't modify this file.
#
# Modify file in .github/jsTemplates/workflows/release.yml.ts
#
# ==========================
name: release
'on':
schedule:
- cron: 0 1 * * SAT
repository_dispatch:
types:
- release_on_demand
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: develop
fetch-depth: 0
- name: Git fetch master
run: git fetch --no-tags --prune --progress --no-recurse-submodules origin +master:master
- name: Use Node.js 12.x
uses: actions/setup-node@v2.1.5
with:
node-version: 12.x
- name: Get npm cache directory
id: get-npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache Node.js modules
uses: actions/cache@v2.1.5
env:
cache-name: cache-node-modules
with:
path: ${{ steps.get-npm-cache.outputs.dir }}
key: ${{ runner.OS }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-${{ env.cache-name }}-
${{ runner.OS }}-
- name: Cache Project node_modules
uses: actions/cache@v2.1.5
id: cache-project-node-modules
env:
cache-name: cache-project-node-modules
with:
path: node_modules
key: ${{ runner.OS }}-${{ env.cache-name }}-${{ github.repository }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache-project-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Set up Python 3.8
uses: actions/setup-python@v2.2.2
with:
python-version: 3.x
- name: Get pip cache directory
id: get-pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.5
id: cache-pip
env:
cache-name: cache-pip
with:
path: ${{ steps.get-pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- run: npm run lint
- run: npm run cover
env:
CHECK_COVERAGE: true
- run: npm run build
env:
NODE_ENV: production
- name: Do semantic release
run: GITHUB_REF=refs/heads/develop GITHUB_ACTION=run8 npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}