Release #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
release: | |
types: [created] | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.release.tag_name, 'v') | |
steps: | |
- name: Checkout to the latest version | |
uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --verbose | |
- name: Install cargo deb | |
run: cargo install cargo-deb | |
- name: Build .deb package | |
run: cargo deb | |
- name: Upload artifacts to release | |
uses: AButler/[email protected] | |
with: | |
files: "./target/debian/*.deb" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Prepare deb package | |
# id: deb_pkg | |
# run: | | |
# FILE=$(ls ./target/debian/*.deb) | |
# if [ -z "$FILE" ]; then | |
# echo ".deb packge not found" | |
# exit 1 | |
# fi | |
# echo "::set-output name=filename::$FILE" | |
# - name: Upload deb package to release assets | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ github.event.release.upload_url }} | |
# asset_path: ${{ steps.deb_pkg.outputs.filename }} | |
# asset_name: ${{ steps.deb_pkg.outputs.filename }} | |
# asset_content_type: application/vnd.debian.binary-package |