-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.13 KB
/
ci.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
name: CI
on:
push:
branches:
- master
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup environment
id: setups
run: |-
echo "::set-output name=yarn_cache::$(yarn cache dir)"
echo "::set-output name=node_version::$(cat .nvmrc)"
- name: Setup Node ${{ steps.setups.outputs.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.setups.outputs.node_version }}
- name: Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.setups.outputs.yarn_cache }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-node-${{ steps.setups.outputs.node_version }}
- run: yarn
- run: yarn build
- run: yarn semantic-release
if: github.event_name == 'push' && github.repository == 'autoguru-au/icons' && github.ref == 'refs/heads/master'
env:
CI: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}