Skip to content

v0.3.5

v0.3.5 #20

Workflow file for this run

name: Rust
on:
release:
types: [created]
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build-and-upload-linux:
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 --release --verbose
- name: Test
run: cargo test --all
- name: Install cargo deb
run: cargo install cargo-deb
- name: Build .deb package
run: cargo deb
- name: Install cargo generate rpm
run: cargo install cargo-generate-rpm
- name: Build .rpm package
run: cargo generate-rpm
- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CRATES_TOKEN }}
- name: Upload artifacts to release
uses: AButler/[email protected]
with:
files: "./target/release/tw;./target/debian/*.deb;./target/generate-rpm/*.rpm"
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-and-upload-windows:
runs-on: windows-latest
if: startsWith(github.event.release.tag_name, 'v')
steps:
- name: Checkout to the latest version
uses: actions/checkout@v4
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: x86_64-pc-windows-msvc
- name: Build
run: cargo build --release --verbose
- name: Test
run: cargo test --all
- name: Upload artifacts to release
uses: AButler/[email protected]
with:
files: "./target/release/*.exe"
repo-token: ${{ secrets.GITHUB_TOKEN }}