| 1 | --- |
| 2 | name: Test & Build |
| 3 | |
| 4 | on: |
| 5 | push: |
| 6 | branches: |
| 7 | - '*' |
| 8 | workflow_dispatch: |
| 9 | |
| 10 | permissions: |
| 11 | contents: write |
| 12 | |
| 13 | jobs: |
| 14 | test: |
| 15 | uses: ./.github/workflows/test.yml |
| 16 | |
| 17 | build: |
| 18 | name: Test build |
| 19 | runs-on: ${{ matrix.os }} |
| 20 | needs: test |
| 21 | |
| 22 | strategy: |
| 23 | matrix: |
| 24 | include: |
| 25 | - build: linux |
| 26 | os: ubuntu-latest |
| 27 | target: x86_64-unknown-linux-musl |
| 28 | |
| 29 | - build: macos |
| 30 | os: macos-latest |
| 31 | target: x86_64-apple-darwin |
| 32 | |
| 33 | steps: |
| 34 | - name: Checkout |
| 35 | uses: actions/checkout@v6 |
| 36 | |
| 37 | - name: Get the release version from the tag |
| 38 | run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 39 | |
| 40 | - name: Install Rust |
| 41 | uses: dtolnay/rust-toolchain@stable |
| 42 | with: |
| 43 | targets: ${{ matrix.target }} |
| 44 | |
| 45 | - name: Build |
| 46 | run: | |
| 47 | cargo build --release --target ${{ matrix.target }} |