Skip to content

Commit

Permalink
Add cargo deb to github actions with releasing and artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Amjad Alsharafi <[email protected]>
  • Loading branch information
Amjad50 committed Oct 27, 2024
1 parent 318606b commit e124f2a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- uses: cargo-bins/cargo-binstall@main

- name: Install cargo-deb
run: cargo binstall cargo-deb -y

- name: Use sccache-cache
uses: mozilla-actions/[email protected]

Expand Down Expand Up @@ -63,6 +68,32 @@ jobs:
files: lcov.info
fail_ci_if_error: true

- name: Create Debian package
run: cargo deb
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

- name: Upload kernel artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: kernel
path: target/debian/*.deb
overwrite: true

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: Release ${{ github.ref_name }}
body: |
Release ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
files: |
target/debian/*.deb
LICENSE
windows:
runs-on: windows-latest

Expand Down

0 comments on commit e124f2a

Please sign in to comment.