v2.1.0 #9
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 - Release creation | |
on: | |
release: | |
types: [created] | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "Set up Rust" | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: "Install dependencies" | |
run: | | |
sudo apt update | |
sudo apt install -y rpm | |
cargo install cargo-deb | |
cargo install cargo-generate-rpm | |
- name: "Publish crates" | |
run: | | |
cargo publish -p adb_client --token ${CRATES_IO_TOKEN} | |
cargo publish -p adb_cli --token ${CRATES_IO_TOKEN} | |
env: | |
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
- name: "build-release" | |
run: cargo build --all-features --release | |
- name: "Build DEB package" | |
run: cargo deb -p adb_cli | |
- name: "Build RPM package" | |
run: cargo generate-rpm -p adb_cli | |
- name: "Publish GitHub artefacts" | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
target/debian/*.deb | |
target/generate-rpm/*.rpm | |
target/release/adb_cli |