-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-to-google-apps-script.yml
More file actions
50 lines (36 loc) · 1.22 KB
/
Copy pathdeploy-to-google-apps-script.yml
File metadata and controls
50 lines (36 loc) · 1.22 KB
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
name: Deploy to Google Apps Script
on:
release:
types: [ published ]
# workflow_dispatch: # enable manual execution
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use defined Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Google Apps Script login
uses: namaggarwal/clasp-token-action@v0.0.1
with:
client-id: ${{ secrets.OAUTH2_CLIENT_ID }}
client-secret: ${{ secrets.OAUTH2_CLIENT_SECRET }}
refresh-token: ${{ secrets.OAUTH2_REFRESH_TOKEN }}
- name: Setup config.js
run: ./scripts/setupConfig.sh ${{ secrets.WORKFLOW_READ_TOKEN }}
- name: Remove all module.exports
run: ./scripts/removeModuleExportsLineFromAllJSFiles.sh
- name: Pre-deployment list of deployments
run: npm run claspDeployments
- name: Push to Google Apps Scripts
run: npm run claspPush
- name: Deploy to Google Apps Scripts
run: npm run claspDeployWithDescription ${{ github.event.release.tag_name }}
- name: Post-deployment list of deployments
run: npm run claspDeployments