Skip to content

bump cargo-deb

bump cargo-deb #8

Workflow file for this run

name: ci
# Only build and release when a tag is pushed with a version number like 1.2.3
on:
push:
tags:
- '[0-9].[0-9].[0-9]'
jobs:
build_release:
name: build and release
runs-on: ubuntu-20.04 # Build on Debian-based distro
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set version # Overwrite the placeholder version number in Cargo.toml with the commit tag
run: |
export VERSION=${{github.ref_name}}
sed -i "s/0.0.0/$VERSION/g" Cargo.toml
- name: Cargo build
run: |
cargo build --release --verbose
ls -lah target/release
- name: Cargo deb
run: |
cargo install --version 1.44.1 cargo-deb
cargo deb --verbose
ls -lah target/debian
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') # Presumably redundant due to the [0-9] filter, but kept for safety
with:
body_path: ${{github.workspace}}/changelog/CHANGELOG.txt # Get the release notes from the changelog file
fail_on_unmatched_files: true
files: |
target/debian/*.deb