-
Notifications
You must be signed in to change notification settings - Fork 47
73 lines (70 loc) · 2.17 KB
/
npmpublish.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Yoga - Gympass Design System
on:
push:
branches:
- master
- alpha
- beta
jobs:
packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Configure CI Git User
run: |
git remote set-url origin https://x-access-token:${{ secrets.GYMPASS_YOGA_DEPLOY_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
git config --global user.email yoga@gympass.com
git config --global user.name Yoga
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn --pure-lockfile --non-interactive
- name: Build
run: |
yarn build:packages
- name: Publish
run: |
export GH_TOKEN="${{ github.token }}"
export NPM_TOKEN="${{ secrets.YOGA_NPM_TOKEN }}"
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
chmod +x ./scripts/publish
./scripts/publish
doc:
runs-on: ubuntu-latest
needs: [packages]
steps:
- uses: actions/checkout@v1
- name: Configure CI Git User
run: |
git remote set-url origin https://x-access-token:${{ secrets.GYMPASS_YOGA_DEPLOY_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
git checkout master
git config --global user.email yoga@gympass.com
git config --global user.name Yoga
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn
- name: Build
run: |
CI=true
yarn build:doc
- name: Deploy
run: |
yarn deploy:doc
- name: Google Chat Notify
run: |
GOOGLE_CHATS_WEBHOOK_URL=${GOOGLE_CHATS_WEBHOOK_URL}
node ./scripts/notify.js
env:
GOOGLE_CHATS_WEBHOOK_URL: ${{ secrets.GOOGLE_CHATS_WEBHOOK_URL }}