From 669eae3c084656f8ec635da3c62ec96134969a43 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Wed, 24 Sep 2025 08:53:04 -0400 Subject: [PATCH] Build linux-arm64 binaries I initially tried cross-compiling from the amd64 runner, but of course that's not as easy as it should be: https://discourse.ubuntu.com/t/failing-to-pull-arm64-apt-packages-in-ubuntu-docker-containers/59377 https://discourse.ubuntu.com/t/http-404-when-attempting-to-fetch-arm64-packages-on-24-04-1/53243 https://github.com/actions/runner-images/issues/12878 https://github.com/actions/runner-images/issues/10901 --- .github/workflows/release-linux-arm64.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/release-linux-arm64.yml diff --git a/.github/workflows/release-linux-arm64.yml b/.github/workflows/release-linux-arm64.yml new file mode 100644 index 0000000..e868b26 --- /dev/null +++ b/.github/workflows/release-linux-arm64.yml @@ -0,0 +1,46 @@ +on: + release: + types: [published] +name: Build Release Binary (Linux ARM64) +jobs: + build: + name: Build Release Binary + runs-on: ubuntu-24.04-arm + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt install libssl-dev + - name: Build binary + run: make + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: git-crypt-artifacts + path: git-crypt + upload: + name: Upload Release Binary + runs-on: ubuntu-latest + needs: build + permissions: + contents: write + steps: + - name: Download release artifact + uses: actions/download-artifact@v4 + with: + name: git-crypt-artifacts + - name: Upload release asset + uses: actions/github-script@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require("fs").promises; + const { repo: { owner, repo }, sha } = context; + await github.repos.uploadReleaseAsset({ + owner, repo, + release_id: ${{ github.event.release.id }}, + name: 'git-crypt-${{ github.event.release.name }}-linux-aarch64', + data: await fs.readFile('git-crypt'), + });