-
Notifications
You must be signed in to change notification settings - Fork 115
49 lines (45 loc) · 1.54 KB
/
cd.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
name: Build SDK Files & GCS Upload
on:
workflow_dispatch:
jobs:
test_build_deploy:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- name: "[Setup] Install dependencies"
run: yarn
- name: "[Test] Run all tests"
run: yarn test:CI
- name: "[Build] Staging"
env:
STAGING_DOMAIN: ${{ secrets.STAGING_DOMAIN }}
run: BUILD_ORIGIN=${STAGING_DOMAIN} API=staging API_ORIGIN=${STAGING_DOMAIN} yarn build:staging
- name: "[Build] Production"
run: yarn build:prod
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: "[Deploy] Upload SDK Files to GCS"
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: 'build/releases'
destination: 'sdk-builds-persistence-onesignal/web-sdk/${{ github.sha }}'
parent: false
- name: "[Deploy] Upload AMP SDK Files to GCS"
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: 'build/amp'
destination: 'sdk-builds-persistence-onesignal/web-sdk/${{ github.sha }}'
parent: false