-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (36 loc) · 1.11 KB
/
release-canary.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
name: Publish Canary Release
on:
push:
jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
if: github.repository == 'sikanhe/gqtx'
steps:
- uses: actions/checkout@v2
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: 14.x-${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}
- uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build
- name: Configure Git Credentials
run: |
git config --global user.email "github-action@users.noreply.github.com"
git config --global user.name "Github Action"
- name: Publish
run: |
cd dist
yarn version --no-git-tag-version --prerelease --preid ${GITHUB_SHA::8}
yarn publish --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}