Skip to content

Upgrade clap and upgrade to version 0.1.1 #8

Upgrade clap and upgrade to version 0.1.1

Upgrade clap and upgrade to version 0.1.1 #8

Workflow file for this run

name: Build and Package
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build-and-package:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Determine Version
id: vars
run: echo "::set-output name=version::$(awk -F '[ =\"]+' '$1 == "version" { print $2 }' Cargo.toml)"
- name: Build release
run: cargo build --release
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Create .deb package
run: cargo deb
- name: List .deb files
run: ls ./target/debian/
- name: Capture .deb filename
id: debfile
run: echo "::set-output name=filename::$(ls ./target/debian/*.deb)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload .deb as Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.debfile.outputs.filename }}
asset_name: ${{ steps.debfile.outputs.filename }}
asset_content_type: application/vnd.debian.binary-package