-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.56 KB
/
rust.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: Build and Release
on:
push:
branches: [ main ]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build (Linux)
run: cargo build --release
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Update Rust (macOS)
run: rustup update stable
- name: Build (macOS)
run: cargo build --release
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build (Windows)
run: cargo build --release
upload-artifacts:
needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest # Can be any OS
steps:
- uses: actions/checkout@v4
- name: Upload Linux Binary
uses: actions/upload-artifact@v3
with:
name: linux-bin
path: target/release
- name: Upload macOS Binary
uses: actions/upload-artifact@v3
with:
name: macos-bin
path: target/release
- name: Upload Windows Binary
uses: actions/upload-artifact@v3
with:
name: windows-bin
path: target/release
download-artifacts: # New job to download artifacts
needs: upload-artifacts
runs-on: ubuntu-latest # Can be any OS (where you want the artifacts)
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
run: |
for os in ubuntu-latest macos-latest windows-latest; do
curl -LJO "https://github.com/${{ github.repository }}/actions/artifacts/${{ github.run_id }}/downloads/${os}-bin.zip"
done