Skip to content

Commit

Permalink
publish: tweak debian publishing workflow
Browse files Browse the repository at this point in the history
- install latest Rust toolchain
- use upload-release-action instead of upload-artifact

[skip ci]
  • Loading branch information
jqnatividad committed Sep 11, 2024
1 parent e4e0be5 commit fb6d005
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions .github/workflows/publish-deb-package.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 }}

0 comments on commit fb6d005

Please sign in to comment.