-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 2.49 KB
/
publish.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Publish
on:
push:
branches: [ "stable" ]
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ningenMe/[email protected]
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: musl-tools gcc-multilib
version: 1.0
- name: Create release dir
run: rm -fr target/github-release && mkdir -p target/github-release
- name: Install x86_64-unknown-linux-gnu toolchain
run: rustup target add x86_64-unknown-linux-gnu
- name: Build for x86_64-unknown-linux-gnu
run: cargo build --verbose --release --target x86_64-unknown-linux-gnu
- name: Copy x86_64-unknown-linux-gnu artifact
run: cp target/x86_64-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.x86_64-unknown-linux-gnu
- name: Install x86_64-unknown-linux-musl toolchain
run: rustup target add x86_64-unknown-linux-musl
- name: Build for x86_64-unknown-linux-gnu
run: cargo build --verbose --release --target x86_64-unknown-linux-musl
- name: Copy x86_64-unknown-linux-musl artifact
run: cp target/x86_64-unknown-linux-musl/release/discord-backup-util target/github-release/discord-backup-util.x86_64-unknown-linux-musl
- name: Install i586-unknown-linux-gnu toolchain
run: rustup target add i586-unknown-linux-gnu
- name: Build for i586-unknown-linux-gnu
run: cargo build --verbose --release --target i586-unknown-linux-gnu --no-default-features --features minreq
- name: Copy i586-unknown-linux-gnu artifact
run: cp target/i586-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.i586-unknown-linux-gnu
- name: Install i686-unknown-linux-gnu toolchain
run: rustup target add i686-unknown-linux-gnu
- name: Build for i686-unknown-linux-gnu
run: cargo build --verbose --release --target i686-unknown-linux-gnu
- name: Copy i686-unknown-linux-gnu artifact
run: cp target/i686-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.i686-unknown-linux-gnu
- uses: colathro/[email protected]
id: crate-version
with:
file: Cargo.toml
- uses: ncipollo/release-action@v1
with:
tag: v${{ steps.crate-version.outputs.version }}
artifacts: "target/github-release/*"
commit: stable
generateReleaseNotes: true