Skip to content

Add task to collect proto files and add steps to release them with tester, nightly and stable builds #1931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 25, 2022
9 changes: 9 additions & 0 deletions .github/workflows/publish-go-nightly-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,15 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.DIST_DIR }}

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Collect proto files
run: task protoc:collect

- name: Create checksum file
working-directory: ${{ env.DIST_DIR}}
run: |
Expand Down
35 changes: 19 additions & 16 deletions .github/workflows/publish-go-tester-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,41 +71,44 @@ jobs:

echo "::set-output name=prefix::$PACKAGE_NAME_PREFIX"

build:
create-artifacts:
needs: package-name-prefix
name: Build ${{ matrix.os.name }}
name: Create artifact ${{ matrix.artifact.name }}
runs-on: ubuntu-latest

strategy:
matrix:
os:
- task: Windows_32bit
artifact:
- task: dist:Windows_32bit
path: "*Windows_32bit.zip"
name: Windows_X86-32
- task: Windows_64bit
- task: dist:Windows_64bit
path: "*Windows_64bit.zip"
name: Windows_X86-64
- task: Linux_32bit
- task: dist:Linux_32bit
path: "*Linux_32bit.tar.gz"
name: Linux_X86-32
- task: Linux_64bit
- task: dist:Linux_64bit
path: "*Linux_64bit.tar.gz"
name: Linux_X86-64
- task: Linux_ARMv6
- task: dist:Linux_ARMv6
path: "*Linux_ARMv6.tar.gz"
name: Linux_ARMv6
- task: Linux_ARMv7
- task: dist:Linux_ARMv7
path: "*Linux_ARMv7.tar.gz"
name: Linux_ARMv7
- task: Linux_ARM64
- task: dist:Linux_ARM64
path: "*Linux_ARM64.tar.gz"
name: Linux_ARM64
- task: macOS_64bit
- task: dist:macOS_64bit
path: "*macOS_64bit.tar.gz"
name: macOS_64
- task: macOS_ARM64
- task: dist:macOS_ARM64
path: "*macOS_ARM64.tar.gz"
name: macOS_ARM64
- task: protoc:collect
path: "*_proto.zip"
name: rpc-protocol-files

steps:
- name: Checkout repository
Expand All @@ -123,18 +126,18 @@ jobs:
run: |
PACKAGE_NAME_PREFIX=${{ needs.package-name-prefix.outputs.prefix }}
export PACKAGE_NAME_PREFIX
task dist:${{ matrix.os.task }}
task ${{ matrix.artifact.task }}

# Transfer builds to artifacts job
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.DIST_DIR }}/${{ matrix.os.path }}
name: ${{ matrix.os.name }}
path: ${{ env.DIST_DIR }}/${{ matrix.artifact.path }}
name: ${{ matrix.artifact.name }}

checksums:
needs:
- build
- create-artifacts
- package-name-prefix
runs-on: ubuntu-latest

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,15 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.DIST_DIR }}

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Collect proto files
run: task protoc:collect

- name: Create checksum file
working-directory: ${{ env.DIST_DIR}}
run: |
Expand Down
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ tasks:
cmds:
- buf lint rpc

protoc:collect:
desc: Create a zip file containing all .proto files in DIST_DIR
dir: rpc
cmds:
- mkdir ../{{.DIST_DIR}}
- zip -r ../{{.DIST_DIR}}/{{.PROJECT_NAME}}_{{.VERSION}}_proto.zip * -i \*.proto

protoc:format:
desc: Perform formatting of the protobuf definitions
cmds:
Expand Down