Skip to content

Merge pull request #84 from symblai/SRE-2116-Fix-url-for-internet-con… #89

Merge pull request #84 from symblai/SRE-2116-Fix-url-for-internet-con…

Merge pull request #84 from symblai/SRE-2116-Fix-url-for-internet-con… #89

Workflow file for this run

name: Upload to CDN
on:
push:
tags:
- 'v1*'
jobs:
build_and_push:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- id: 'googleauth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- id: upload_minified_file
uses: google-github-actions/upload-cloud-storage@v0
with:
path: dist/symbl.min.js
destination: ${{ secrets.GCP_BUCKET_NAME }}/js/beta/symbl-web-sdk/${{ env.RELEASE_VERSION }}
parent: false
- id: upload_unminified_file
uses: google-github-actions/upload-cloud-storage@v0
with:
path: dist/symbl.js
destination: ${{ secrets.GCP_BUCKET_NAME }}/js/beta/symbl-web-sdk/${{ env.RELEASE_VERSION }}
parent: false
- id: upload_minified_file_to_latest
uses: google-github-actions/upload-cloud-storage@v0
with:
path: dist/symbl.min.js
destination: ${{ secrets.GCP_BUCKET_NAME }}/js/beta/symbl-web-sdk/latest
parent: false
- id: upload_unminified_file_to_latest
uses: google-github-actions/upload-cloud-storage@v0
with:
path: dist/symbl.js
destination: ${{ secrets.GCP_BUCKET_NAME }}/js/beta/symbl-web-sdk/latest
parent: false