ci: Use qemu instead of docker #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release aarch64 binaries | |
on: [push] | |
jobs: | |
release: | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: ["aarch64"] | |
os: ["ubuntu18.04", "ubuntu20.04", "ubuntu22.04", "alpine"] | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- uses: actions/checkout@v4 | |
- name: Build libbaihook | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static | |
sudo update-binfmts --enable qemu-arm | |
sudo update-binfmts --enable qemu-aarch64 | |
./build.sh ${{ matrix.os }} | |
rm -rf Makefile | |
- name: Release to GitHub | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
files: | | |
./*.so |