v1.1.0 #2
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: Release Builds | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-win: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --release --verbose | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: resfetch-win | |
path: target/release/deps/resfetch.exe | |
retention-days: 90 | |
build-unix: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --release --verbose | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: resfetch-${{ matrix.os }} | |
path: target/release/resfetch | |
retention-days: 90 | |
publish: | |
needs: [build-win, build-unix] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Publish using cargo | |
run: cargo publish --token ${{ secrets.CRATES_TOKEN }} |