From fb6d005d0e0f9efcaa108230c09137e34155bade Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:54:38 -0400 Subject: [PATCH] `publish`: tweak debian publishing workflow - install latest Rust toolchain - use upload-release-action instead of upload-artifact [skip ci] --- .github/workflows/publish-deb-package.yml | 45 ++++++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-deb-package.yml b/.github/workflows/publish-deb-package.yml index bdba51678..8fe95af0c 100644 --- a/.github/workflows/publish-deb-package.yml +++ b/.github/workflows/publish-deb-package.yml @@ -1,8 +1,11 @@ -name: qsv Debian Package +name: Publish Debian Package on: workflow_dispatch: +env: + QSV_KIND: prebuilt + jobs: analyze-tags: runs-on: ubuntu-22.04 @@ -20,20 +23,42 @@ jobs: needs: analyze-tags runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - name: Installing Rust toolchain + uses: actions-rs/toolchain@v1 with: - fetch-depth: 0 - persist-credentials: false - token: ${{ secrets.GITHUB_TOKEN }} - + toolchain: stable + profile: minimal + target: x86_64-unknown-linux-gnu + override: true + + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # persist-credentials: false + # token: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ needs.analyze-tags.outputs.previous-tag }} + - name: Install Cargo Deb run: cargo install cargo-deb - name: Build Debian Package run: cargo deb - - name: Upload Debian Package - uses: actions/upload-artifact@v3 + # - name: Upload Debian Package + # uses: actions/upload-artifact@v3 + # with: + # name: qsv-deb + # path: target/debian/* + + - name: Upload zipped binaries to release + uses: svenstaro/upload-release-action@v2 with: - name: qsv-deb - path: target/debian/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/debian/qsv_${{ needs.analyze-tags.outputs.previous-tag }}-1_x86_64-unknown-linux-gnu.deb + asset_name: qsv_${{ needs.analyze-tags.outputs.previous-tag }}-1_x86_64-unknown-linux-gnu.deb + overwrite: true + tag: ${{ needs.analyze-tags.outputs.previous-tag }}