This repository has been archived by the owner on Aug 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.78 KB
/
publish.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: CI
on:
push:
branches: [main]
jobs:
build:
strategy:
max-parallel: 1
matrix:
channel:
- latest
- dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Install dependencies
# Before merging to main, re-run the install for security purposes
# https://yarnpkg.com/features/zero-installs/#does-it-have-security-implications
# run: yarn install --check-cache
run: yarn install
- name: Build
run: yarn ci:build
- name: Test
run: yarn ci:test
- name: Release to @dev channel
if: matrix.channel == 'dev'
run: |
yarn changeset version --snapshot
yarn ci:publish-beta
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.FORESTRYIO_NPM_AUTH_TOKEN }}
FORESTRYIO_NPM_AUTH_IDENT: ${{ secrets.FORESTRYIO_NPM_AUTH_IDENT }}
FORESTRYIO_NPM_AUTH_TOKEN: ${{ secrets.FORESTRYIO_NPM_AUTH_TOKEN }}
- name: Publish
if: matrix.channel == 'latest'
run: yarn ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.FORESTRYIO_NPM_AUTH_TOKEN }}
FORESTRYIO_NPM_AUTH_IDENT: ${{ secrets.FORESTRYIO_NPM_AUTH_IDENT }}
FORESTRYIO_NPM_AUTH_TOKEN: ${{ secrets.FORESTRYIO_NPM_AUTH_TOKEN }}
- name: Create release pull request
uses: changesets/action@master
if: matrix.channel == 'latest'
with:
version: yarn changeset version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}