-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (56 loc) · 1.85 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
name: Release
on: release
jobs:
DeployRelease:
name: deploy a mozaic release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Extract Tag
id: gettag
shell: bash
run: echo "::set-output name=branch::$(echo ${{ github.ref }} | iconv -t ASCII | sed -r 's/[^a-zA-Z0-9]+//g' | sed -r 's/refstags//g' | sed -r 's/^-+\\|-+$//g' | tr A-Z a-z)"
- run: npm install yarn -g
- run: yarn lerna
- name: Build a production website
run: yarn build
env:
GH_API_TOKEN: ${{ secrets.SVC_GH_API_TOKEN }}
- name: deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.SVC_GH_API_TOKEN }}
env: production
ref: ${{ github.head_ref }}
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
workload_identity_provider: ${{ secrets.GCP_WI_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
- id: 'deploy'
name: 'Deploy Tag'
uses: 'google-github-actions/deploy-appengine@v1'
with:
project_id: mozaic-design-system-dtrp
deliverables: app.yaml
version: ${{ steps.gettag.outputs.branch }}
promote: true
- name: Update deployment status
uses: bobheadxi/deployments@v1
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: https://mozaic.adeo.cloud