diff options
Diffstat (limited to '.github/workflows/release.yml')
| -rw-r--r-- | .github/workflows/release.yml | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d6c5dba..2be7084e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: tags: - 'v*' +permissions: + contents: write + packages: write + jobs: linux-x86_64: runs-on: ubuntu-latest @@ -84,10 +88,31 @@ jobs: brew update brew install gmp libunistring bdw-gc llvm binutils - - name: Build + - name: Build arm64 run: | make clean - make -j + make -j \ + CC=clang \ + CFLAGS="-arch arm64" \ + LDFLAGS="-arch arm64" + mv build/tomo build/tomo-arm64 + + - name: Build x86_64 + run: | + make clean + make -j \ + CC=clang \ + CFLAGS="-arch x86_64" \ + LDFLAGS="-arch x86_64" + mv build/tomo build/tomo-x86_64 + + - name: Create universal binary + run: | + lipo -create \ + build/tomo-arm64 \ + build/tomo-x86_64 \ + -output build/tomo + lipo -info build/tomo - name: Package run: | @@ -102,6 +127,3 @@ jobs: tomo-macos-universal.tar.gz tomo-macos-universal.tar.gz.sha256 -permissions: - contents: write - packages: write |
