Skip to content

Merge pull request #86 from symblai/v1.0.13 #91

Merge pull request #86 from symblai/v1.0.13

Merge pull request #86 from symblai/v1.0.13 #91

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_PROD_CREDENTIALS }}'
- run: gcloud auth list
- 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