-
Notifications
You must be signed in to change notification settings - Fork 3
203 lines (170 loc) · 6.48 KB
/
engine-release.yaml
File metadata and controls
203 lines (170 loc) · 6.48 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: Engine Release
on:
repository_dispatch:
types: [release-engine]
env:
CI: true
WORKING_DIRECTORY: '.'
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: false
permissions:
contents: write
jobs:
# goreleaser-darwin:
# name: Release MacOS build
# runs-on: 'macos-latest'
# timeout-minutes: 20
# steps:
# - name: checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: ${{ github.event.client_payload.ref }}
# - uses: ./.github/actions/go
# with:
# working-directory: ${{ env.WORKING_DIRECTORY }}
# - name: Install Protoc
# uses: abelfodil/protoc-action@v1
# with:
# protoc-version: '21.5'
# - name: Install Gon
# run: |
# brew tap mitchellh/gon
# brew install gon
# - name: Import Code-Signing Certificates
# uses: Apple-Actions/import-codesign-certs@v1
# with:
# p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
# p12-password: ${{ secrets.AC_PASSWORD }}
# - name: Show installed SDK's
# run: xcodebuild -showsdks
# - name: generate go types based on protobuf definitions
# run: make codegen-go
# - name: Check if git is not dirty after generating files
# run: git diff --no-ext-diff --exit-code
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v3
# with:
# version: latest
# workdir: './cmd/wunderctl'
# distribution: goreleaser-pro
# args: release --rm-dist --config ./../../.github/goreleaser/.goreleaser-darwin.yml
# env:
# # custom PAT to push in https://github.com/wundergraph/homebrew-wundergraph
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN_GORELEASER }}
# AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
# GH_AUTH_DEMO_CLIENT_ID: ${{ secrets.GH_AUTH_DEMO_CLIENT_ID }}
# GH_AUTH_DEMO_CLIENT_SECRET: ${{ secrets.GH_AUTH_DEMO_CLIENT_SECRET }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# LICENSING_PUBLIC_KEY: ${{ secrets.LICENSING_PUBLIC_KEY }}
goreleaser-linux:
name: Release Linux build
runs-on: 'ubuntu-latest'
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.ref }}
- uses: ./.github/actions/go
with:
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Install Protoc
uses: abelfodil/protoc-action@v1
with:
protoc-version: '21.5'
- name: go env
run: go env
- name: generate go types based on protobuf definitions
run: make codegen-go
- name: Check if git is not dirty after generating files
run: git diff --no-ext-diff --exit-code
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
workdir: './cmd/wunderctl'
distribution: goreleaser
args: release --clean --config ./../../.github/goreleaser/.goreleaser-linux.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
GH_AUTH_DEMO_CLIENT_ID: ${{ secrets.GH_AUTH_DEMO_CLIENT_ID }}
GH_AUTH_DEMO_CLIENT_SECRET: ${{ secrets.GH_AUTH_DEMO_CLIENT_SECRET }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
LICENSING_PUBLIC_KEY: ${{ secrets.LICENSING_PUBLIC_KEY }}
# goreleaser-win:
# name: Release Windows build
# runs-on: 'windows-latest'
# timeout-minutes: 20
# steps:
# - name: Prepare git
# # To fix the EOL issues on Windows runners, we need to disable autocrlf. See actions/checkout#135 for more info.
# # https://github.com/actions/checkout/issues/135#issuecomment-613361104
# run: |
# git config --global core.autocrlf false
# git config --global core.eol lf
# - name: checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: ${{ github.event.client_payload.ref }}
# - uses: ./.github/actions/go
# with:
# working-directory: ${{ env.WORKING_DIRECTORY }}
# - name: Install Protoc
# uses: abelfodil/protoc-action@v1
# with:
# protoc-version: '21.5'
# - name: go env
# run: go env
# - name: generate go types based on protobuf definitions
# run: make codegen-go
# - name: Check if git is not dirty after generating files
# run: git diff --no-ext-diff --exit-code
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v3
# with:
# version: latest
# workdir: './cmd/wunderctl'
# distribution: goreleaser-pro
# args: release --rm-dist --config ./../../.github/goreleaser/.goreleaser-windows.yml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
# GH_AUTH_DEMO_CLIENT_ID: ${{ secrets.GH_AUTH_DEMO_CLIENT_ID }}
# GH_AUTH_DEMO_CLIENT_SECRET: ${{ secrets.GH_AUTH_DEMO_CLIENT_SECRET }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# LICENSING_PUBLIC_KEY: ${{ secrets.LICENSING_PUBLIC_KEY }}
# release-wunderctl:
# # https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
# permissions:
# id-token: write
# name: Release wunderctl wrapper
# needs:
# - goreleaser-linux
# # - goreleaser-win
# # - goreleaser-darwin
# runs-on: ubuntu-latest
# timeout-minutes: 20
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: ${{ github.event.client_payload.ref }}
# - uses: ./.github/actions/node
# with:
# working-directory: ${{ env.WORKING_DIRECTORY }}
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - run: pnpm install --ignore-scripts
# - run: pnpm run build:libs
# - run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: pnpm publish --access public --tag latest --no-git-checks
# # https://github.blog/2023-04-19-introducing-npm-package-provenance
# env:
# NPM_CONFIG_PROVENANCE: true
# working-directory: packages/wunderctl