From 828f063b534eff534c9908f5624184ad64d22ab3 Mon Sep 17 00:00:00 2001 From: Ross Younger Date: Sun, 10 Nov 2024 11:44:24 +1300 Subject: [PATCH] chore(skip,ci): make better use of BUILT_DEB_FILE, set RUST_BACKTRACE at build time - always set BUILT_DEB_FILE to silence a warning - make better use of BUILT_DEB_FILE - set RUST_BACKTRACE at build time - don't upload a deb in release workflow unless the matrix is configured to build one --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2dc0e2..d07f18c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,9 @@ on: workflow_dispatch: env: + BUILT_DEB_FILE: "invalid.deb" # updated by make-debian-package script CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 jobs: # Build the app on all supported platforms, at least for the time being diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd5b4ce..ea25dfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,9 @@ on: workflow_dispatch: # for testing env: + BUILT_DEB_FILE: "invalid.deb" # updated by make-debian-package script CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 permissions: contents: write @@ -71,9 +73,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: qcp-deb-${{ matrix.target }} - path: target/**/debian/qcp*.deb + path: ${{ env.BUILT_DEB_FILE }} - name: Publish deb package to release - if: ${{ github.event_name == 'release' }} + if: ${{ matrix.build_deb }} && ${{ github.event_name == 'release' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh release upload ${{ github.ref }} ${{ env.BUILT_DEB_FILE }}