Skip to content

Build SDK Files & GCS Upload #51

Build SDK Files & GCS Upload

Build SDK Files & GCS Upload #51

Workflow file for this run

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