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 Extract Janus Binaries | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
platform: [linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU for Multi-Arch | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Janus for ${{ matrix.platform }} | |
run: | | |
docker buildx create --use | |
docker buildx build \ | |
--platform=${{ matrix.platform }} \ | |
--output type=local,dest=./output-${{ matrix.platform }} ./JanusCoreDeps | |
- name: List Extracted Binaries | |
run: ls -lh ./output-${{ matrix.platform }}/opt/janus | |
- name: Upload Janus Binaries as Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: janus-binary-${{ matrix.platform }} | |
path: ./output-${{ matrix.platform }}/opt/janus | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Download All Binaries | |
uses: actions/download-artifact@v4 | |
with: | |
path: bin/ | |
- name: Organize Binaries | |
run: | | |
mkdir -p release | |
mv bin/janus-binary-*/* release/ | |
ls -lh release/ | |
- name: Commit and Push Binaries | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git add release/ | |
git commit -m "Update Janus binaries" || echo "No changes to commit" | |
git push |