Skip to content

Commit

Permalink
Fixing multiplatform release
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiimk committed Feb 8, 2024
1 parent 81e938a commit a0b3b59
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
include:
- runs-on: ubuntu-latest
target: x86_64-unknown-linux-musl

- runs-on: macos-14
target: aarch64-apple-darwin
name: Build
Expand All @@ -28,9 +27,32 @@ jobs:
with:
target: ${{ matrix.target }}
override: true

- name: Install docker (macOS)
if: contains(matrix.runs-on, 'macos-')
# See: https://blog.netnerds.net/2022/11/docker-macos-github-actions/
run: |
brew install docker
colima start
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install musl (linux)
if: contains(matrix.target, '-musl')
# See: https://blog.urth.org/2023/03/05/cross-compiling-rust-projects-in-github-actions/
run: |
sudo apt-get update --yes
sudo apt-get install --yes musl-tools
- name: Build engine
run: |
cargo build --release --target ${{ matrix.target }}
- name: Build image
run: |
docker build \
Expand All @@ -39,12 +61,6 @@ jobs:
-t ${{ env.IMAGE }} \
-f image/Dockerfile \
.
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
run: |
docker push ${{ env.IMAGE }}
Expand Down

0 comments on commit a0b3b59

Please sign in to comment.