@@ -17,20 +17,24 @@ jobs:
1717 include :
1818 - os : ubuntu-latest
1919 target : x86_64-unknown-linux-gnu
20- artifact_name : rustfox
21- asset_name : rustfox-linux-x86_64
20+ rustfox_bin : rustfox
21+ setup_bin : setup
22+ archive_name : rustfox-linux-x86_64.tar.gz
2223 - os : macos-latest
2324 target : x86_64-apple-darwin
24- artifact_name : rustfox
25- asset_name : rustfox-macos-x86_64
25+ rustfox_bin : rustfox
26+ setup_bin : setup
27+ archive_name : rustfox-macos-x86_64.tar.gz
2628 - os : macos-latest
2729 target : aarch64-apple-darwin
28- artifact_name : rustfox
29- asset_name : rustfox-macos-aarch64
30+ rustfox_bin : rustfox
31+ setup_bin : setup
32+ archive_name : rustfox-macos-aarch64.tar.gz
3033 - os : windows-latest
3134 target : x86_64-pc-windows-msvc
32- artifact_name : rustfox.exe
33- asset_name : rustfox-windows-x86_64.exe
35+ rustfox_bin : rustfox.exe
36+ setup_bin : setup.exe
37+ archive_name : rustfox-windows-x86_64.zip
3438
3539 steps :
3640 - uses : actions/checkout@v4
@@ -46,15 +50,29 @@ jobs:
4650 - name : Build
4751 run : cargo build --release --target ${{ matrix.target }}
4852
49- - name : Rename binary
53+ - name : Stage release files
5054 shell : bash
51- run : mv target/${{ matrix.target }}/release/${{ matrix.artifact_name }} target/${{ matrix.target }}/release/${{ matrix.asset_name }}
55+ run : |
56+ mkdir staging
57+ cp target/${{ matrix.target }}/release/${{ matrix.rustfox_bin }} staging/
58+ cp target/${{ matrix.target }}/release/${{ matrix.setup_bin }} staging/
59+ cp config.example.toml staging/
60+ cp -r skills staging/
61+
62+ - name : Create archive (Unix)
63+ if : runner.os != 'Windows'
64+ run : tar -czf ${{ matrix.archive_name }} -C staging .
65+
66+ - name : Create archive (Windows)
67+ if : runner.os == 'Windows'
68+ shell : pwsh
69+ run : Compress-Archive -Path staging\* -DestinationPath ${{ matrix.archive_name }}
5270
5371 - name : Upload artifact
5472 uses : actions/upload-artifact@v4
5573 with :
56- name : ${{ matrix.asset_name }}
57- path : target/ ${{ matrix.target }}/release/${{ matrix.asset_name }}
74+ name : ${{ matrix.archive_name }}
75+ path : ${{ matrix.archive_name }}
5876 if-no-files-found : error
5977
6078 release :
0 commit comments