Skip to content

Commit 13f2255

Browse files
authored
Add task to collect proto files and add steps to release them with tester, nightly and stable builds (#1931)
* Add task to zip all .proto files for release * Add proto files in nightly released files * Add proto files in tester released files * Add proto files in stable released files * Fix tester build workflow * Fix checksums.txt creation in tester and stable build releases * Change build job of tester build workflow to be generic * Fix Publish Tester Build job dependencies
1 parent f239754 commit 13f2255

File tree

4 files changed

+44
-16
lines changed

4 files changed

+44
-16
lines changed

Diff for: .github/workflows/publish-go-nightly-task.yml

+9
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ jobs:
236236
name: ${{ env.ARTIFACT_NAME }}
237237
path: ${{ env.DIST_DIR }}
238238

239+
- name: Install Task
240+
uses: arduino/setup-task@v1
241+
with:
242+
repo-token: ${{ secrets.GITHUB_TOKEN }}
243+
version: 3.x
244+
245+
- name: Collect proto files
246+
run: task protoc:collect
247+
239248
- name: Create checksum file
240249
working-directory: ${{ env.DIST_DIR}}
241250
run: |

Diff for: .github/workflows/publish-go-tester-task.yml

+19-16
Original file line numberDiff line numberDiff line change
@@ -71,41 +71,44 @@ jobs:
7171
7272
echo "prefix=$PACKAGE_NAME_PREFIX" >> $GITHUB_OUTPUT
7373
74-
build:
74+
create-artifacts:
7575
needs: package-name-prefix
76-
name: Build ${{ matrix.os.name }}
76+
name: Create artifact ${{ matrix.artifact.name }}
7777
runs-on: ubuntu-latest
7878

7979
strategy:
8080
matrix:
81-
os:
82-
- task: Windows_32bit
81+
artifact:
82+
- task: dist:Windows_32bit
8383
path: "*Windows_32bit.zip"
8484
name: Windows_X86-32
85-
- task: Windows_64bit
85+
- task: dist:Windows_64bit
8686
path: "*Windows_64bit.zip"
8787
name: Windows_X86-64
88-
- task: Linux_32bit
88+
- task: dist:Linux_32bit
8989
path: "*Linux_32bit.tar.gz"
9090
name: Linux_X86-32
91-
- task: Linux_64bit
91+
- task: dist:Linux_64bit
9292
path: "*Linux_64bit.tar.gz"
9393
name: Linux_X86-64
94-
- task: Linux_ARMv6
94+
- task: dist:Linux_ARMv6
9595
path: "*Linux_ARMv6.tar.gz"
9696
name: Linux_ARMv6
97-
- task: Linux_ARMv7
97+
- task: dist:Linux_ARMv7
9898
path: "*Linux_ARMv7.tar.gz"
9999
name: Linux_ARMv7
100-
- task: Linux_ARM64
100+
- task: dist:Linux_ARM64
101101
path: "*Linux_ARM64.tar.gz"
102102
name: Linux_ARM64
103-
- task: macOS_64bit
103+
- task: dist:macOS_64bit
104104
path: "*macOS_64bit.tar.gz"
105105
name: macOS_64
106-
- task: macOS_ARM64
106+
- task: dist:macOS_ARM64
107107
path: "*macOS_ARM64.tar.gz"
108108
name: macOS_ARM64
109+
- task: protoc:collect
110+
path: "*_proto.zip"
111+
name: rpc-protocol-files
109112

110113
steps:
111114
- name: Checkout repository
@@ -123,18 +126,18 @@ jobs:
123126
run: |
124127
PACKAGE_NAME_PREFIX=${{ needs.package-name-prefix.outputs.prefix }}
125128
export PACKAGE_NAME_PREFIX
126-
task dist:${{ matrix.os.task }}
129+
task ${{ matrix.artifact.task }}
127130
128131
# Transfer builds to artifacts job
129132
- name: Upload build artifact
130133
uses: actions/upload-artifact@v3
131134
with:
132-
path: ${{ env.DIST_DIR }}/${{ matrix.os.path }}
133-
name: ${{ matrix.os.name }}
135+
path: ${{ env.DIST_DIR }}/${{ matrix.artifact.path }}
136+
name: ${{ matrix.artifact.name }}
134137

135138
checksums:
136139
needs:
137-
- build
140+
- create-artifacts
138141
- package-name-prefix
139142
runs-on: ubuntu-latest
140143

Diff for: .github/workflows/release-go-task.yml

+9
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,15 @@ jobs:
241241
name: ${{ env.ARTIFACT_NAME }}
242242
path: ${{ env.DIST_DIR }}
243243

244+
- name: Install Task
245+
uses: arduino/setup-task@v1
246+
with:
247+
repo-token: ${{ secrets.GITHUB_TOKEN }}
248+
version: 3.x
249+
250+
- name: Collect proto files
251+
run: task protoc:collect
252+
244253
- name: Create checksum file
245254
working-directory: ${{ env.DIST_DIR}}
246255
run: |

Diff for: Taskfile.yml

+7
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ tasks:
215215
cmds:
216216
- buf lint rpc
217217

218+
protoc:collect:
219+
desc: Create a zip file containing all .proto files in DIST_DIR
220+
dir: rpc
221+
cmds:
222+
- mkdir ../{{.DIST_DIR}}
223+
- zip -r ../{{.DIST_DIR}}/{{.PROJECT_NAME}}_{{.VERSION}}_proto.zip * -i \*.proto
224+
218225
protoc:format:
219226
desc: Perform formatting of the protobuf definitions
220227
cmds:

0 commit comments

Comments
 (0)