Skip to content

Commit

Permalink
chore(skip,ci): make better use of BUILT_DEB_FILE, set RUST_BACKTRACE…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
crazyscot committed Nov 9, 2024
1 parent 98eb49c commit 828f063
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 828f063

Please sign in to comment.