-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.01 KB
/
semantic-release.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
name: semantic-release
on: [push]
jobs:
release:
# Only release on push to master
if: github.event_name == 'push' && github.ref == 'refs/heads/production'
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.yarn
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-
${{ runner.os }}-
- name: Install
run: |
yarn
- name: Build
run: |
yarn tsc
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}