-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (51 loc) · 1.74 KB
/
upload-to-cdn.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
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