-
Notifications
You must be signed in to change notification settings - Fork 23
36 lines (31 loc) · 1.04 KB
/
release.yml
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
name: "tagged-release"
on:
push:
tags:
- "v*"
permissions: read-all
jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"
steps:
- uses: 'actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac'
- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
- run: yarn install
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b'
# Now you can run gcloud commands authenticated as the impersonated service account.
- id: 'gcloud'
name: 'Deploy to google cloud function'
env:
CLOUDSDK_CORE_PROJECT: '${{ secrets.GCP_PROJECT }}'
GCP_REGION: '${{ secrets.GCP_REGION }}'
run: |
gcloud config set functions/region $GCP_REGION
yarn release