-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (62 loc) · 2.02 KB
/
Copy pathrelease-api.yml
File metadata and controls
62 lines (62 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
target: x86_64-unknown-linux-gnu
zigtarget: x86_64-unknown-linux-gnu.2.39
- os: ubuntu-24.04-arm
arch: arm64
target: aarch64-unknown-linux-gnu
zigtarget: aarch64-unknown-linux-gnu.2.39
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
# mise.toml pins `postgres = "18"`, which mise builds from source — it needs
# readline + uuid headers present first (mirrors ci.yml).
- name: install postgres build deps for mise
run: sudo apt-get install -y libreadline-dev uuid-dev
- uses: jdx/mise-action@v4
- uses: Swatinem/rust-cache@v2
# Pin glibc 2.39 via cargo-zigbuild so the binary boots on noble (24.04)
# and never links a newer glibc symbol from the runner. Pure-Rust crate,
# but we keep glibc (not musl) for a reliable internal-DNS resolver.
- name: build
run: cargo zigbuild --release --target ${{ matrix.zigtarget }} -p beyond-queue
- name: package
run: |
VERSION=${GITHUB_REF_NAME#api-v}
tar -czf beyond-queue-v${VERSION}-linux-${{ matrix.arch }}.tar.gz \
-C target/${{ matrix.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