Merge pull request #28 from ameijboom/feat/add-monolithic-push-in-config #184
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
| on: [push] | |
| name: build | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os.runner }} | |
| strategy: | |
| matrix: | |
| os: | |
| - name: darwin | |
| vendor: apple | |
| runner: macos-14 | |
| - name: linux | |
| vendor: unknown | |
| runner: ubuntu-22.04 | |
| libc: ["", gnu, musl] | |
| arch: [x86_64, aarch64] | |
| exclude: | |
| - os: | |
| name: linux | |
| libc: "" | |
| - os: | |
| name: linux | |
| arch: aarch64 | |
| libc: musl | |
| - os: | |
| name: darwin | |
| libc: gnu | |
| - os: | |
| name: darwin | |
| libc: musl | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install prerequisites | |
| if: ${{ matrix.os.name == 'linux' }} | |
| run: | | |
| sudo apt-get update && \ | |
| sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools | |
| - run: | | |
| echo "RUST_TARGET=${{ matrix.arch }}-${{ matrix.os.vendor }}-${{ matrix.os.name }}${{ matrix.libc && '-' }}${{ matrix.libc }}" >> $GITHUB_ENV | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ env.RUST_TARGET }} | |
| - name: Cargo build | |
| run: cargo build --target ${{ env.RUST_TARGET }} --release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: steiger-${{ env.RUST_TARGET }} | |
| path: target/${{ env.RUST_TARGET }}/release/steiger | |
| image: | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Download Linux binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: steiger-x86_64-unknown-linux-gnu | |
| path: target/x86_64-unknown-linux-gnu/release/steiger | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - run: | | |
| cp ./target/x86_64-unknown-linux-gnu/release/steiger/steiger steiger && | |
| sudo install -m 0755 steiger /usr/local/bin/steiger && | |
| steiger build --repo ghcr.io/brainhivenl |