From 321a18e53a92484855e62e3c26bb917ddcf6d2fc Mon Sep 17 00:00:00 2001 From: Darren Worrall Date: Fri, 9 Feb 2024 12:49:18 +0000 Subject: [PATCH] Update release workflow for multi-arch --- .github/workflows/release.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25e6f14f..93c7d6fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,11 @@ on: - main jobs: - release: - runs-on: ubuntu-latest + build-debs: + strategy: + matrix: + runner: [ubuntu-latest, shopify-ubuntu-arm64] + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v2 @@ -19,7 +22,28 @@ jobs: - name: Building Ghostferry run: .github/workflows/build-deb.sh + - name: Upload debs + uses: actions/upload-artifact@v3 + with: + name: debs-${{ github.sha }} + path: build/ghostferry* + + release: + runs-on: ubuntu-latest + needs: build-debs + steps: + - name: Fetch uploaded artifacts + uses: actions/download-artifact@v3 + with: + name: debs-${{ github.sha }} + - name: shasum + shell: bash + run: | + sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum + echo "sha256sum:" + cat ghostferry-$GITHUB_SHA.sha256sum + - name: Releasing Ghostferry to Github - run: gh release create --target ${GITHUB_REF#refs/heads/} -p release-${GITHUB_SHA::7} build/ghostferry* + run: gh release create --target ${GITHUB_REF#refs/heads/} -p release-${GITHUB_SHA::7} ghostferry* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}