1
+ on :
2
+ push :
3
+ tags :
4
+ - ' v*'
5
+
6
+ name : Create Release
7
+
8
+ jobs :
9
+ build :
10
+ name : Build [${{ matrix.config.name }}]
11
+ runs-on : ${{ matrix.config.os }}
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ config :
16
+ - { name: Linux (x64), os: ubuntu-latest, suffix: linux-x64, target: "x86_64-unknown-linux-gnu" }
17
+ - { name: Linux (ARM), os: ubuntu-latest, suffix: linux-arm, target: "aarch64-unknown-linux-gnu" }
18
+ - { name: MacOS (x64), os: macos-latest, suffix: macos-x64, target: "x86_64-apple-darwin" }
19
+ - { name: MacOS (ARM), os: macos-latest, suffix: macos-arm, target: "aarch64-apple-darwin" }
20
+ - { name: Windows (x64), os: windows-latest, suffix: win-x64, target: "x86_64-pc-windows-msvc" }
21
+
22
+ steps :
23
+ - name : Checkout
24
+ uses : actions/checkout@v4
25
+
26
+ - uses : dtolnay/rust-toolchain@stable
27
+ with :
28
+ targets : ${{ matrix.config.target }}
29
+
30
+ - name : Setup aarch64
31
+ if : matrix.config.target == 'aarch64-unknown-linux-gnu'
32
+ run : |
33
+ sudo apt update
34
+ sudo apt install gcc-aarch64-linux-gnu
35
+ echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config
36
+ echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config
37
+
38
+ - name : Build OwOverlay (Release)
39
+ run : cargo build --release
40
+
41
+ - uses : actions/upload-artifact@v4
42
+ if : matrix.config.target == 'x86_64-pc-windows-msvc'
43
+ with :
44
+ name : owoverlay-${{ matrix.config.suffix }}
45
+ path : target/release/owoverlay.exe
46
+ compression-level : 9
47
+
48
+ - uses : actions/upload-artifact@v4
49
+ if : matrix.config.target != 'x86_64-pc-windows-msvc'
50
+ with :
51
+ name : owoverlay-${{ matrix.config.suffix }}
52
+ path : target/release/owoverlay
53
+ compression-level : 9
0 commit comments