-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.8 KB
/
Copy pathrelease-server.yml
File metadata and controls
51 lines (51 loc) · 1.8 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: beyond-pg server release
on:
push:
tags:
- server/v*
permissions:
contents: write
# The `postgres` dev tool (vfox plugin) isn't needed to compile the binaries and
# its PostInstall hook fails on the arm64 runner — skip it for the release build.
env:
MISE_DISABLE_TOOLS: postgres
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
arch: amd64
target: x86_64-unknown-linux-musl
- runs-on: ubuntu-24.04-arm
arch: arm64
target: aarch64-unknown-linux-musl
runs-on: ${{ matrix.runs-on }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v4
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Resolve version
id: meta
run: echo "version=${GITHUB_REF_NAME#server/v}" >> "$GITHUB_OUTPUT"
- name: Install rust target
run: rustup target add ${{ matrix.target }}
- name: Build musl static binaries
run: cargo zigbuild --release --target ${{ matrix.target }} -p beyond-pg -p beyond-pg-init
- name: Package assets
run: |
VERSION="${{ steps.meta.outputs.version }}"
DIR="target/${{ matrix.target }}/release"
tar -czf "beyond-pg-v${VERSION}-linux-${{ matrix.arch }}.tar.gz" -C "$DIR" beyond-pg
tar -czf "beyond-pg-init-v${VERSION}-linux-${{ matrix.arch }}.tar.gz" -C "$DIR" beyond-pg-init
- name: Upload release assets
uses: softprops/action-gh-release@v3
with:
files: |
beyond-pg-v${{ steps.meta.outputs.version }}-linux-${{ matrix.arch }}.tar.gz
beyond-pg-init-v${{ steps.meta.outputs.version }}-linux-${{ matrix.arch }}.tar.gz