ci: publish beyond-queue image to ghcr (#5) #1
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*" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| SQLX_OFFLINE: "true" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| arch: amd64 | |
| - os: ubuntu-24.04-arm | |
| arch: arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: jdx/mise-action@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: build | |
| run: cargo build --release --bin beyond-queue | |
| - name: package | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#api-v} | |
| tar -czf beyond-queue-v${VERSION}-linux-${{ matrix.arch }}.tar.gz \ | |
| -C target/release beyond-queue | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: binary-${{ matrix.arch }} | |
| path: beyond-queue-*.tar.gz | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| - name: create release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "$GITHUB_REF_NAME" \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --title "$GITHUB_REF_NAME" \ | |
| --generate-notes \ | |
| beyond-queue-*.tar.gz |