This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
76 lines (66 loc) · 2.38 KB
/
deploy_to_npm.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
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
74
75
76
name: Publish Packages
on:
workflow_dispatch:
push:
branches:
- release
- master
env:
nodeTestTimeout: 4000
browserTestTimeout: 8000
DETECT_CHROMEDRIVER_VERSION: true
HARP_NO_HARD_SOURCE_CACHE: true
jobs:
deploy:
name: Deploy coresdk packages
runs-on: ubuntu-latest
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install
run: yarn --frozen-lockfile
shell: bash
- name: Test
run: |
yarn pre-test
yarn test-cov
yarn karma-headless
yarn karma-headless-firefox
shell: bash
- name: Build
run: |
npx cross-env NODE_ENV=production yarn run build
yarn run typedoc
npx cross-env NODE_ENV=production yarn run build-www
yarn prepare-doc-deploy
# debug: lerna publish expects clean workspace
./scripts/git-check-clean-workspace.sh
shell: bash
- name: Setup Node
if: github.ref == 'refs/heads/release'
uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Deploy To NPM
if: github.ref == 'refs/heads/release'
run: npx lerna publish -y from-git --pre-dist-tag alpha
shell: bash
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Deploy To S3
if: github.ref == 'refs/heads/release' || github.ref == 'refs/heads/master'
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: 'harp.gl'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
SOURCE_DIR: 'dist/s3_deploy'