-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (64 loc) · 1.89 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
name: release
on:
push:
branches: [master]
permissions: write-all
jobs:
generate-api-docs:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- name: Setup Sage
uses: einride/sage/actions/setup@master
with:
go-version: '^1.20'
check-latest: true
fetch-depth: 1 // only get latest commit
- name: Setup Node
# Latest version `v3.7.0` contains a bug, see the following issue:
# https://github.com/actions/setup-node/issues/801
uses: actions/[email protected]
with:
node-version: 18
- name: Generate API Documentation
run: make generate-api-doc
- name: Authenticate to GCP prod
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.WIF_E_EXTEND_PROD }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
- id: 'upload-file'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: '.'
glob: 'api_*.pdf'
destination: 'api-document-bucket'
process_gcloudignore: false
release:
needs: generate-api-docs
runs-on: ubuntu-latest
steps:
- name: Setup Sage
uses: einride/sage/actions/setup@master
with:
go-version: '^1.20'
check-latest: true
fetch-depth: 1 // only get latest commit
- name: Make
run: make
- name: Buf Push
working-directory: proto
run: make buf-push
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
- name: Fetch tags
run: git fetch --force --tags
- name: Release
uses: go-semantic-release/[email protected]
with:
allow-initial-development-versions: true
hooks: goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}