Skip to content
This repository was archived by the owner on Jan 10, 2026. It is now read-only.

Commit 070bc1b

Browse files
committed
Manual compilation and release
1 parent db0aef8 commit 070bc1b

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,51 @@ on:
99
jobs:
1010
release:
1111
name: release ${{ matrix.target }}
12-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
include:
1717
- target: x86_64-pc-windows-gnu
18+
os: windows-latest
1819
archive: zip
20+
extension: .exe
1921
- target: x86_64-unknown-linux-musl
20-
archive: tar.gz tar.xz tar.zst
22+
os: ubuntu-22.04
23+
archive: zip
24+
extension: ""
2125
- target: aarch64-unknown-linux-musl
22-
archive: tar.gz tar.xz tar.zst
26+
os: ubuntu-22.04-arm
27+
archive: zip
28+
extension: ""
2329
- target: x86_64-apple-darwin
30+
os: macos-13
2431
archive: zip
32+
extension: ""
2533
- target: aarch64-apple-darwin
34+
os: macos-latest
2635
archive: zip
36+
extension: ""
2737

2838
steps:
2939
- uses: actions/checkout@master
30-
- name: Compile and release
31-
uses: rust-build/rust-build.action@v1.4.5
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
- uses: actions-rust-lang/setup-rust-toolchain@v1
3441
with:
35-
RUSTTARGET: ${{ matrix.target }}
36-
ARCHIVE_TYPES: ${{ matrix.archive }}
37-
TOOLCHAIN_VERSION: 1.85.0
38-
- name: Upload artifact
39-
uses: actions/upload-artifact@v4
42+
toolchain: 1.85.0
43+
- name: Compile
44+
id: compile
45+
run: |
46+
cargo build --release --target ${{ matrix.target }}
47+
- name: Create zip archive
48+
id: zip_release
49+
run: |
50+
mkdir -p release
51+
cp target/${{ matrix.target }}/release/moodriver${{ matrix.extension }} release/
52+
cd release
53+
zip -r moodriver-${{ matrix.target }}.zip moodriver${{ matrix.extension }}
54+
echo "ARCHIVE_PATH=release/moodriver-${{ matrix.target }}.zip" >> $GITHUB_OUTPUT
55+
- name: Upload to GitHub Release
56+
uses: softprops/action-gh-release@v1
57+
if: startsWith(github.ref, 'refs/tags/')
4058
with:
41-
name: moosync
42-
path: |
43-
${{ steps.compile.outputs.BUILT_ARCHIVE }}
44-
${{ steps.compile.outputs.BUILT_CHECKSUM }}
59+
files: ${{ steps.zip_release.outputs.ARCHIVE_PATH }}

0 commit comments

Comments
 (0)