From 6f53026c380f18eaae045cba111bec338595002b Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Mon, 10 Jun 2024 13:23:14 +0200 Subject: [PATCH] Add build linux to build all --- .github/workflows/build_all.yaml | 47 ++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_all.yaml b/.github/workflows/build_all.yaml index af917ca..2fe9f3b 100644 --- a/.github/workflows/build_all.yaml +++ b/.github/workflows/build_all.yaml @@ -79,8 +79,43 @@ jobs: with: name: windows-artifacts path: dist/ + build-linux: + runs-on: + - ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Run Docker Container + run: | + docker run --rm \ + --volume "${{ github.workspace }}:/src/" \ + --env SPECFILE=./BTClockOTA.spec \ + ghcr.io/btclock/pyinstaller-wxpython-linux:latest && + mv dist/BTClockOTA dist/BTClockOTA-linux-amd64 + - name: Archive artifacts + uses: actions/upload-artifact@v4 + with: + name: linux-artifacts + path: dist/ release: - needs: [build-macos, build-windows] + needs: [build-macos, build-windows, build-linux] runs-on: ubuntu-latest permissions: contents: write @@ -96,18 +131,24 @@ jobs: with: name: windows-artifacts path: windows - - name: Get Job 1 Artifacts + - name: Get macOS Artifacts if: ${{ always() }} uses: actions/download-artifact@v4 with: name: macos-artifacts path: macos + - name: Get Linux Artifacts + if: ${{ always() }} + uses: actions/download-artifact@v4 + with: + name: linux-artifacts + path: linux - name: Create release uses: ncipollo/release-action@v1 with: tag: ${{ steps.getBlockHeight.outputs.blockHeight }} commit: main name: release-${{ steps.getBlockHeight.outputs.blockHeight }} - artifacts: "macos/**/*.dmg,macos/**/*.zip,windows/**/*.exe" + artifacts: "macos/**/*.dmg,macos/**/*.zip,windows/**/*.exe,linux/*" allowUpdates: true makeLatest: true