-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (51 loc) · 1.66 KB
/
continous_delivery.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: 'Continous delivery'
on:
push:
branches:
- main
- next
- beta
jobs:
Release:
name: 'Release'
runs-on: ubuntu-latest
env:
NODE_VERSION: 12.x
steps:
- name: 'Git checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
# Beginning of yarn setup, keep in sync between all workflows
- name: Use node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: 'Use cached node_modules'
id: cache-modules
uses: actions/[email protected]
with:
path: '**/node_modules'
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
- name: 'Find location of global yarn cache'
id: yarn-cache
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: 'Cache global yarn cache'
uses: actions/[email protected]
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Install dependency'
run: yarn install --frozen-lockfile
# End of yarn setup
- name: 'Semantic release'
env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_PR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release