Skip to content

Merge pull request #6 from groovenauts/features/update_golang_runtime #6

Merge pull request #6 from groovenauts/features/update_golang_runtime

Merge pull request #6 from groovenauts/features/update_golang_runtime #6

Workflow file for this run

#
# 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}