-
Notifications
You must be signed in to change notification settings - Fork 964
44 lines (41 loc) · 1.27 KB
/
publish-npm-canary.yaml
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
# TODO: Figure out how to make this workflow depend on the build, lint, test
# workflow. Then we don't have to double down on these run tasks.
name: Publish canaray packages to npm
on:
push:
branches: [master]
tags-ignore: [v*] # We do not want to publish a canary release when we're publish an actual release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required because lerna uses tags to determine the version.
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Print node and yarn versions
run: |
node --version
yarn --version
- name: Install dependencies
run: yarn install --frozen-lockfile --check-files
- name: Run ESLint
run: yarn lint
env:
CI: true
- name: Build
run: yarn build
- name: Run tests
run: yarn test
env:
CI: true
- name: Publish to npm
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
./tasks/publish-canary
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}