3939 redub : latest
4040
4141 - name : Build
42+ if : runner.os != 'macOS'
4243 run : |
4344 redub build -b release-debug --prefetch
44-
45+ - name : Build (OSX Universal)
46+ if : runner.os == 'macOS'
47+ run : |
48+ # Build arm64 version
49+ redub build -b release-debug --prefetch --arch=aarch64
50+ mv build/redub build/redub-arm64
51+
52+ # Build x86_64 version
53+ redub build -b release-debug --prefetch --arch=x86_64
54+ mv build/redub build/redub-x86_64
55+
56+ lipo -create build/redub-arm64 build/redub-x86_64 -output build/redub
57+ rm build/redub-arm64 build/redub-x86_64
58+
4559 - name : Rename artifact on Windows
4660 if : runner.os == 'Windows'
4761 run : |
@@ -54,14 +68,25 @@ jobs:
5468 name : redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-windows-${{ matrix.arch }}.exe
5569 path : redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-windows-${{ matrix.arch }}.exe
5670
57- - name : Rename artifact Unix
58- if : runner.os != 'Windows'
71+ - name : Rename artifact on macOS
72+ if : runner.os == 'macOS'
73+ run : |
74+ ls -R
75+ mv build/redub redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-${{ matrix.os_name }}-universal
76+ - name : Upload artifacts on macOS
77+ uses : actions/upload-artifact@v4
78+ if : runner.os == 'macOS'
79+ with :
80+ name : redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-${{ matrix.os_name }}-universal
81+
82+ - name : Rename artifact on Linux
83+ if : runner.os == 'Linux'
5984 run : |
6085 ls -R
6186 mv build/redub redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-${{ matrix.os_name }}-${{ matrix.arch }}
62- - name : Upload artifacts on Unix
87+ - name : Upload artifacts on Linux
6388 uses : actions/upload-artifact@v4
64- if : runner.os != 'Windows '
89+ if : runner.os == 'Linux '
6590 with :
6691 name : redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-${{ matrix.os_name }}-${{ matrix.arch }}
6792 path : redub-${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'latest' }}-${{ matrix.os_name }}-${{ matrix.arch }}
0 commit comments