-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.29 KB
/
release-api.yml
File metadata and controls
51 lines (51 loc) · 1.29 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
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