Skip to content

Commit a2a999a

Browse files
committed
One more go at the release builds today
1 parent b10ed62 commit a2a999a

File tree

1 file changed

+41
-10
lines changed

1 file changed

+41
-10
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,105 @@
11
name: Release
2+
23
on:
34
push:
45
tags:
56
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
611
env:
712
CARGO_TERM_COLOR: always
13+
814
jobs:
915
build:
16+
name: Build ${{ matrix.target }}
1017
strategy:
18+
fail-fast: false
1119
matrix:
1220
include:
1321
- os: ubuntu-latest
1422
target: x86_64-unknown-linux-gnu
1523
binary: lomux
1624
archive: lomux-linux-x64.tar.gz
25+
1726
- os: windows-latest
1827
target: x86_64-pc-windows-msvc
1928
binary: lomux.exe
2029
archive: lomux-windows-x64.zip
30+
2131
- os: macos-latest
2232
target: x86_64-apple-darwin
2333
binary: lomux
2434
archive: lomux-macos-x64.tar.gz
35+
build_app_bundle: true
36+
2537
- os: macos-latest
2638
target: aarch64-apple-darwin
2739
binary: lomux
2840
archive: lomux-macos-arm64.tar.gz
41+
2942
runs-on: ${{ matrix.os }}
43+
3044
steps:
3145
- uses: actions/checkout@v4
46+
3247
- uses: dtolnay/rust-toolchain@stable
3348
with:
3449
targets: ${{ matrix.target }}
50+
3551
- name: Install Linux deps
3652
if: runner.os == 'Linux'
3753
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev
54+
3855
- name: Build
3956
run: cargo build --release --target ${{ matrix.target }}
40-
- name: Build Mac App Bundle
41-
if: runner.os == 'macOS' && matrix.target == 'x86_64-apple-darwin'
57+
58+
- name: Build macOS App Bundle
59+
if: ${{ matrix.build_app_bundle == true }}
4260
run: |
4361
cargo install cargo-bundle
4462
cargo bundle --release
4563
tar czf LoMux.app.tar.gz -C target/release/bundle/osx LoMux.app
46-
- name: Archive Binary
64+
65+
- name: Archive binary
66+
shell: bash
4767
run: |
68+
cd target/${{ matrix.target }}/release
4869
if [ "${{ runner.os }}" = "Windows" ]; then
49-
cd target/${{ matrix.target }}/release
5070
7z a ../../../${{ matrix.archive }} ${{ matrix.binary }}
5171
else
52-
cd target/${{ matrix.target }}/release
5372
tar czf ../../../${{ matrix.archive }} ${{ matrix.binary }}
5473
fi
55-
shell: bash
74+
5675
- uses: actions/upload-artifact@v4
5776
with:
5877
name: ${{ matrix.archive }}
59-
path: |
60-
${{ matrix.archive }}
61-
LoMux.app.tar.gz
78+
path: ${{ matrix.archive }}
79+
80+
- name: Upload macOS .app bundle
81+
if: ${{ matrix.build_app_bundle == true }}
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: LoMux.app
85+
path: LoMux.app.tar.gz
86+
6287
release:
88+
name: Create GitHub Release
6389
needs: build
6490
runs-on: ubuntu-latest
6591
steps:
6692
- uses: actions/download-artifact@v4
6793
with:
6894
merge-multiple: true
95+
6996
- run: ls -laR
70-
- uses: softprops/action-gh-release@v1
97+
98+
- name: Create GitHub Release
99+
uses: softprops/action-gh-release@v2
71100
with:
101+
tag_name: ${{ github.ref_name }}
102+
generate_release_notes: true
72103
files: |
73104
*.tar.gz
74105
*.zip

0 commit comments

Comments
 (0)