v0.3.2 #16
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-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: Publish to crates.io | |
run: cargo publish --token ${{ secrets.CRATES_TOKEN }} | |
- 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: 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 }} |