Repository navigation
ci(release): rustup target add before zigbuild (musl std missing in CI) #4
Workflow file for this run
This file contains hidden or 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: Release API | |
| on: | |
| push: | |
| tags: | |
| - api-v* | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - runs-on: ubuntu-latest | |
| target: x86_64-unknown-linux-musl | |
| arch: amd64 | |
| - runs-on: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-musl | |
| arch: arm64 | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: jdx/mise-action@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install rust target | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Build release binary | |
| run: cargo zigbuild --release --target ${{ matrix.target }} -p beyond-objects | |
| - name: Package | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#api-v} | |
| ARCHIVE="beyond-objects-v${VERSION}-linux-${{ matrix.arch }}.tar.gz" | |
| tar -czf "$ARCHIVE" -C target/${{ matrix.target }}/release beyond-objects | |
| echo "ARCHIVE=$ARCHIVE" >> "$GITHUB_ENV" | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: ${{ env.ARCHIVE }} |