-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (40 loc) · 1.19 KB
/
rust-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: "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
- 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 }}