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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
needs: create-release
strategy:
matrix:
include:
# NOTE: compatibility according to LLM model o3
# ---------- everything we can build on Linux ----------
# x86_64
# compatibility: Ubuntu 14.04+, Debian 8+, RHEL/CentOS 7+, Fedora 21+, openSUSE, Arch, etc. Any x86-64 distro with glibc ≥ 2.17. (Not Alpine)
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu.2.17
build-tool: cargo-zigbuild
# aarch64
# compatibility: Ubuntu 20.04+, Debian 11+, Amazon Linux 2, AWS Graviton, Raspberry Pi OS 64-bit, etc. Any aarch64/arm64 distro with glibc ≥ 2.17.
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu.2.17
build-tool: cargo-zigbuild
# musl (Alpine etc.)
# compatibility: Alpine 3.12+, Distroless and scratch containers, and very old glibc systems. Fully static; no external libraries. Still needs a CA-certificate bundle (apk add ca-certificates on Alpine).
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
build-tool: cargo-zigbuild
# # windows - faster alternative to native windows toolchain
# # compatibility: Windows 7 SP1 / Server 2008 R2 and newer, including Windows 11. Requires the “Universal C Runtime” which is already present on Windows 10+ or via the VC++ 2015-2022 redistributable on older systems. No other DLLs needed.
# - os: ubuntu-latest
# target: x86_64-pc-windows-msvc
# build-tool: cargo-zigbuild
# ---------- macOS (needs real mac runner) -------------
# compatibility: macOS 10.13 High Sierra (2017) or newer. Intel + Apple Silicon.
- os: macos-14
target: universal-apple-darwin
build-tool: cargo
# ---------- native Windows toolchain ------------------
# switch to this if issues are reported with the zig build
- os: windows-latest
target: x86_64-pc-windows-msvc
build-tool: cargo
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Install cargo-zigbuild using Homebrew for macOS
if: runner.os == 'macOS' && matrix.build-tool == 'cargo-zigbuild'
run: brew install cargo-zigbuild
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: ngit,git-remote-nostr
target: ${{ matrix.target }}
features: vendored-openssl
build-tool: ${{ matrix.build-tool }}
# final file name: ngit-v1.6.3-x86_64-unknown-linux-gnu.tar.gz …
archive: ngit-$tag-${{ matrix.target }}
tar: unix
zip: windows
token: ${{ secrets.GITHUB_TOKEN }}