-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.14 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
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions
#
name: Release
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
dump:
name: Dump env vars, contexts
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Environment Variables
run: export -p
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
release:
name: Release
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v2
# https://github.com/google-github-actions/auth
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
# https://github.com/google-github-actions/setup-gcloud
- uses: 'google-github-actions/setup-gcloud@v0'
- name: Check Cloud SDK version/components
run: |
set -x
gcloud version
gcloud info
gcloud components list
gcloud auth list
- name: Install Cloud SDK components
run: |
set -x
gcloud components install app-engine-go
gcloud components list
- name: Stage application code to Cloud Storage
run: |
set -x
bucket=${{ secrets.GCP_STAGE_BUCKET }}
version=$(basename ${{ github.ref }})
./stage.sh ${bucket} ${version}