GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(ci): add full release pipelines for runner, server binaries and … · gitbundle/gitbundle@2f44271

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • runner
      • release.yml
    • server
      • binary.yml
      • docker.yml
  • README.md
  • runner.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/runner/release.yml‎

Copy file name to clipboard
+179Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
name: Main Release
2+
3+
on:
4+
create:
5+
tags:
6+
- "v*"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
PROJECT_NAME: runner
11+
RELEASE_DIR: release
12+
LLVM_MINGW_ROOT: /opt/llvm-mingw
13+
LLVM_MINGW_VER: 20251216
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
os: [ubuntu24, ubuntu24-gnullvm, macos]
20+
arch: [x64, arm64, arm]
21+
include:
22+
- os: ubuntu24
23+
arch: x64
24+
target: x86_64-unknown-linux-gnu
25+
name: linux-x64
26+
- os: ubuntu24
27+
arch: arm64
28+
target: aarch64-unknown-linux-gnu
29+
name: linux-arm64
30+
- os: ubuntu24
31+
arch: arm
32+
target: armv7-unknown-linux-gnueabihf
33+
name: linux-arm
34+
- os: ubuntu24-gnullvm
35+
arch: x64
36+
target: x86_64-pc-windows-gnullvm
37+
name: windows-x64
38+
- os: ubuntu24-gnullvm
39+
arch: arm64
40+
target: aarch64-pc-windows-gnullvm
41+
name: windows-arm64
42+
- os: macos
43+
arch: arm64
44+
target: aarch64-apple-darwin
45+
name: macos-arm64
46+
- os: macos
47+
arch: x64
48+
target: x86_64-apple-darwin
49+
name: macos-x64
50+
exclude:
51+
- os: ubuntu24-gnullvm
52+
arch: arm
53+
- os: macos
54+
arch: arm
55+
56+
name: Build (${{ matrix.os }} / ${{ matrix.arch }})
57+
runs-on: [self-hosted, "${{ matrix.os }}", "${{ matrix.arch }}"]
58+
59+
steps:
60+
- uses: actions/checkout@v6
61+
62+
- name: Install toolchains
63+
if: ${{ contains(fromJson('["ubuntu24", "ubuntu24-gnullvm"]'), matrix.os) && vars.install_toolchains == 'true' }}
64+
shell: bash
65+
run: |
66+
sudo apt update
67+
sudo apt install -y \
68+
clang \
69+
libclang-dev \
70+
llvm-dev
71+
72+
- name: Setup llvm-mingw
73+
if: ${{ matrix.os == 'ubuntu24-gnullvm' && vars.setup_llvm_mingw == 'true' }}
74+
shell: bash
75+
run: |
76+
set -euxo pipefail
77+
78+
ARCH="$(uname -m)"
79+
case "$ARCH" in
80+
x86_64) ARCH="x86_64" ;;
81+
aarch64) ARCH="aarch64" ;;
82+
*) echo "unsupported arch: $ARCH"; exit 1 ;;
83+
esac
84+
85+
FILE="/tmp/llvm-mingw.tar.xz"
86+
URL="https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VER}/llvm-mingw-${LLVM_MINGW_VER}-ucrt-ubuntu-22.04-${ARCH}.tar.xz"
87+
curl -fL "$URL" -o "$FILE"
88+
89+
sudo rm -rf "$LLVM_MINGW_ROOT"
90+
sudo mkdir -p "$LLVM_MINGW_ROOT"
91+
sudo tar -xJf "$FILE" --strip-components=1 -C "$LLVM_MINGW_ROOT"
92+
ls -1 "$LLVM_MINGW_ROOT"
93+
94+
- uses: actions/setup-go@v6
95+
with:
96+
go-version: '1.25'
97+
98+
- name: Setup Rust Target
99+
run: rustup target add "${{ matrix.target }}"
100+
101+
- name: Build Binary
102+
run: cargo build --release --target "${{ matrix.target }}"
103+
104+
- name: Prepare Release Directory
105+
run: mkdir -p "$RELEASE_DIR"
106+
107+
- name: Copy Binary to Release Dir
108+
shell: bash
109+
run: |
110+
SRC_PATH="target/${{ matrix.target }}/release/${PROJECT_NAME}"
111+
BIN_NAME="${{ matrix.name }}"
112+
DEST="${RELEASE_DIR}/${PROJECT_NAME}-${BIN_NAME}"
113+
114+
if [[ "${{ matrix.os }}" == "ubuntu24-gnullvm" ]]; then
115+
cp "${SRC_PATH}.exe" "${DEST}.exe"
116+
else
117+
cp "${SRC_PATH}" "${DEST}"
118+
fi
119+
120+
- name: Install gitbundle-xtask
121+
if: vars.install_gitbundle_xtask == 'true'
122+
shell: bash
123+
run: |
124+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
125+
cargo binstall gitbundle-xtask -y
126+
127+
- name: Run gitbundle-xtask
128+
shell: bash
129+
run: |
130+
BIN_PATH="${RELEASE_DIR}/${PROJECT_NAME}-${{ matrix.name }}"
131+
132+
EXTRA_ARGS=()
133+
if [[ "${{ matrix.os }}" == "ubuntu24-gnullvm" ]]; then
134+
BIN_PATH="${BIN_PATH}.exe"
135+
EXTRA_ARGS+=(--mingw-path "$LLVM_MINGW_ROOT")
136+
fi
137+
138+
gitbundle-xtask \
139+
--binary-file "$BIN_PATH" \
140+
--target-name "${PROJECT_NAME}" \
141+
--output-path dist \
142+
"${EXTRA_ARGS[@]}"
143+
144+
- name: Show Dist Output
145+
run: ls -la dist/
146+
147+
- uses: actions/upload-artifact@v5
148+
if: startsWith(github.ref, 'refs/tags/')
149+
with:
150+
name: ${{ matrix.name }}
151+
path: "dist/${{ env.PROJECT_NAME }}-${{ matrix.name }}.*"
152+
153+
release:
154+
name: Publish GitHub Release
155+
needs: build
156+
runs-on: macos-latest
157+
if: startsWith(github.ref, 'refs/tags/')
158+
steps:
159+
- uses: actions/download-artifact@v7
160+
with:
161+
path: dist
162+
163+
- name: Show Dist Downloaded
164+
shell: bash
165+
run: |
166+
ls -R
167+
ls -R dist/
168+
169+
- uses: softprops/action-gh-release@v2
170+
with:
171+
repository: gitbundle/gitbundle
172+
tag_name: runner-${{ github.ref_name }}
173+
name: GitBundle Runner ${{ github.ref_name }}
174+
draft: true
175+
prerelease: true
176+
files: dist/**/*
177+
# generate_release_notes: true
178+
# body: |
179+
# 123
Collapse file

‎.github/server/binary.yml‎

Copy file name to clipboard
+168Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: Release Binaries
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
PROJECT_NAME: gitbundle
10+
RELEASE_DIR: release
11+
LLVM_MINGW_ROOT: /opt/llvm-mingw
12+
LLVM_MINGW_VER: 20251216
13+
FEATURE_VENDORED: "vendored-openssl,vendored-libgit2"
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
os: [ubuntu24, ubuntu24-gnullvm, macos]
20+
arch: [x64, arm64]
21+
include:
22+
- os: ubuntu24
23+
arch: x64
24+
target: x86_64-unknown-linux-gnu
25+
name: linux-x64
26+
- os: ubuntu24
27+
arch: arm64
28+
target: aarch64-unknown-linux-gnu
29+
name: linux-arm64
30+
- os: ubuntu24-gnullvm
31+
arch: x64
32+
target: x86_64-pc-windows-gnullvm
33+
name: windows-x64
34+
- os: ubuntu24-gnullvm
35+
arch: arm64
36+
target: aarch64-pc-windows-gnullvm
37+
name: windows-arm64
38+
- os: macos
39+
arch: arm64
40+
target: aarch64-apple-darwin
41+
name: macos-arm64
42+
- os: macos
43+
arch: x64
44+
target: x86_64-apple-darwin
45+
name: macos-x64
46+
47+
name: Build (${{ matrix.os }} / ${{ matrix.arch }})
48+
runs-on: [self-hosted, "${{ matrix.os }}", "${{ matrix.arch }}"]
49+
50+
steps:
51+
- uses: actions/checkout@v6
52+
53+
- name: Install toolchains
54+
if: ${{ contains(fromJson('["ubuntu24", "ubuntu24-gnullvm"]'), matrix.os) && vars.install_toolchains == 'true' }}
55+
shell: bash
56+
run: |
57+
sudo apt update
58+
sudo apt install -y \
59+
clang \
60+
libclang-dev \
61+
llvm-dev
62+
63+
- name: Setup llvm-mingw
64+
if: ${{ matrix.os == 'ubuntu24-gnullvm' && vars.setup_llvm_mingw == 'true' }}
65+
shell: bash
66+
run: |
67+
set -euxo pipefail
68+
69+
ARCH="$(uname -m)"
70+
case "$ARCH" in
71+
x86_64) ARCH="x86_64" ;;
72+
aarch64) ARCH="aarch64" ;;
73+
*) echo "unsupported arch: $ARCH"; exit 1 ;;
74+
esac
75+
76+
FILE="/tmp/llvm-mingw.tar.xz"
77+
URL="https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VER}/llvm-mingw-${LLVM_MINGW_VER}-ucrt-ubuntu-22.04-${ARCH}.tar.xz"
78+
curl -fL "$URL" -o "$FILE"
79+
80+
sudo rm -rf "$LLVM_MINGW_ROOT"
81+
sudo mkdir -p "$LLVM_MINGW_ROOT"
82+
sudo tar -xJf "$FILE" --strip-components=1 -C "$LLVM_MINGW_ROOT"
83+
ls -1 "$LLVM_MINGW_ROOT"
84+
85+
- uses: actions/setup-go@v6
86+
with:
87+
go-version: '1.25'
88+
89+
- name: Setup Rust Target
90+
run: rustup target add "${{ matrix.target }}"
91+
92+
- name: Build Binary
93+
run: cargo build --release --target "${{ matrix.target }}" --features "${FEATURE_VENDORED}"
94+
95+
- name: Prepare Release Directory
96+
run: mkdir -p "$RELEASE_DIR"
97+
98+
- name: Copy Binary to Release Dir
99+
shell: bash
100+
run: |
101+
SRC_PATH="target/${{ matrix.target }}/release/${PROJECT_NAME}"
102+
BIN_NAME="${{ matrix.name }}"
103+
DEST="${RELEASE_DIR}/${PROJECT_NAME}-${BIN_NAME}"
104+
105+
if [[ "${{ matrix.os }}" == "ubuntu24-gnullvm" ]]; then
106+
cp "${SRC_PATH}.exe" "${DEST}.exe"
107+
else
108+
cp "${SRC_PATH}" "${DEST}"
109+
fi
110+
111+
- name: Install gitbundle-xtask
112+
if: vars.install_gitbundle_xtask == 'true'
113+
shell: bash
114+
run: |
115+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
116+
cargo binstall gitbundle-xtask -y
117+
118+
- name: Run gitbundle-xtask
119+
shell: bash
120+
run: |
121+
BIN_PATH="${RELEASE_DIR}/${PROJECT_NAME}-${{ matrix.name }}"
122+
123+
EXTRA_ARGS=()
124+
if [[ "${{ matrix.os }}" == "ubuntu24-gnullvm" ]]; then
125+
BIN_PATH="${BIN_PATH}.exe"
126+
EXTRA_ARGS+=(--mingw-path "$LLVM_MINGW_ROOT")
127+
fi
128+
129+
gitbundle-xtask \
130+
--binary-file "$BIN_PATH" \
131+
--target-name "${PROJECT_NAME}" \
132+
--output-path dist \
133+
"${EXTRA_ARGS[@]}"
134+
135+
- name: Show Dist Output
136+
run: ls -la dist/
137+
138+
- uses: actions/upload-artifact@v5
139+
if: startsWith(github.ref, 'refs/tags/')
140+
with:
141+
name: ${{ matrix.name }}
142+
path: "dist/${{ env.PROJECT_NAME }}-${{ matrix.name }}.*"
143+
144+
release:
145+
name: Publish GitHub Release
146+
needs: build
147+
runs-on: macos-latest
148+
if: startsWith(github.ref, 'refs/tags/')
149+
steps:
150+
- uses: actions/download-artifact@v7
151+
with:
152+
path: dist
153+
154+
- name: Show Dist Downloaded
155+
shell: bash
156+
run: |
157+
ls -R
158+
ls -R dist/
159+
160+
- uses: softprops/action-gh-release@v2
161+
with:
162+
repository: gitbundle/gitbundle
163+
tag_name: server-${{ github.ref_name }}
164+
name: GitBundle Server ${{ github.ref_name }}
165+
draft: true
166+
prerelease: true
167+
files: dist/**/*
168+
# generate_release_notes: true

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.