Skip to content

Commit 1ce8ac5

Browse files
committed
Init
0 parents  commit 1ce8ac5

File tree

171 files changed

+28365
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+28365
-0
lines changed

.air.asynqmon.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
root = "."
2+
testdata_dir = "testdata"
3+
tmp_dir = "tmp"
4+
5+
[build]
6+
args_bin = []
7+
bin = "./tmp/asynqmon"
8+
cmd = "go build -o ./tmp/asynqmon ./cmd/asynqmon"
9+
delay = 1000
10+
exclude_dir = []
11+
exclude_file = []
12+
exclude_regex = ["_test.go"]
13+
exclude_unchanged = false
14+
follow_symlink = false
15+
full_bin = ""
16+
include_dir = ["internal", "cmd"]
17+
include_ext = ["go", "tpl", "tmpl", "html", "yaml", "yml", "sh"]
18+
include_file = []
19+
kill_delay = "0s"
20+
log = "build-errors-asynqmon.log"
21+
poll = false
22+
poll_interval = 0
23+
rerun = false
24+
rerun_delay = 500
25+
send_interrupt = false
26+
stop_on_root = false
27+
28+
[color]
29+
app = ""
30+
build = "yellow"
31+
main = "magenta"
32+
runner = "green"
33+
watcher = "cyan"
34+
35+
[log]
36+
main_only = false
37+
time = false
38+
silent = true
39+
40+
[misc]
41+
clean_on_exit = false
42+
43+
[screen]
44+
clear_on_rebuild = false
45+
keep_scroll = true

.air.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
root = "."
2+
testdata_dir = "testdata"
3+
tmp_dir = "tmp"
4+
5+
[build]
6+
args_bin = []
7+
bin = "./tmp/main"
8+
cmd = "go build -o ./tmp/main ./cmd/server"
9+
delay = 1000
10+
exclude_dir = []
11+
exclude_file = []
12+
exclude_regex = ["_test.go"]
13+
exclude_unchanged = false
14+
follow_symlink = false
15+
full_bin = ""
16+
include_dir = ["internal", "cmd"]
17+
include_ext = ["go", "tpl", "tmpl", "html", "yaml", "yml", "sh"]
18+
include_file = []
19+
kill_delay = "30s"
20+
log = "build-errors.log"
21+
poll = false
22+
poll_interval = 0
23+
rerun = false
24+
rerun_delay = 500
25+
send_interrupt = true
26+
stop_on_root = false
27+
28+
[color]
29+
app = ""
30+
build = "yellow"
31+
main = "magenta"
32+
runner = "green"
33+
watcher = "cyan"
34+
35+
[log]
36+
main_only = false
37+
time = false
38+
silent = true
39+
40+
[misc]
41+
clean_on_exit = false
42+
43+
[screen]
44+
clear_on_rebuild = false
45+
keep_scroll = true

.air.worker.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
root = "."
2+
testdata_dir = "testdata"
3+
tmp_dir = "tmp"
4+
5+
[build]
6+
args_bin = []
7+
bin = "./tmp/worker"
8+
cmd = "go build -o ./tmp/worker ./cmd/worker"
9+
delay = 1000
10+
exclude_dir = []
11+
exclude_file = []
12+
exclude_regex = ["_test.go"]
13+
exclude_unchanged = false
14+
follow_symlink = false
15+
full_bin = ""
16+
include_dir = ["internal", "cmd"]
17+
include_ext = ["go", "tpl", "tmpl", "html", "yaml", "yml", "sh"]
18+
include_file = []
19+
kill_delay = "30s"
20+
log = "build-errors-worker.log"
21+
poll = false
22+
poll_interval = 0
23+
rerun = false
24+
rerun_delay = 500
25+
send_interrupt = true
26+
stop_on_root = false
27+
28+
[color]
29+
app = ""
30+
build = "yellow"
31+
main = "magenta"
32+
runner = "green"
33+
watcher = "cyan"
34+
35+
[log]
36+
main_only = false
37+
time = false
38+
silent = true
39+
40+
[misc]
41+
clean_on_exit = false
42+
43+
[screen]
44+
clear_on_rebuild = false
45+
keep_scroll = true

.github/workflows/release.yml

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version tag (e.g., v1.0.0)'
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
build:
19+
name: Build and Release Branchd
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v5
28+
with:
29+
go-version: '1.23'
30+
31+
- name: Set up Bun
32+
uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: latest
35+
36+
- name: Get version
37+
id: version
38+
run: |
39+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
40+
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
41+
else
42+
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
43+
fi
44+
45+
- name: Build Go binaries (ARM64)
46+
run: |
47+
echo "Building server binary for ARM64..."
48+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build \
49+
-ldflags="-s -w -X main.version=${{ steps.version.outputs.VERSION }}" \
50+
-trimpath \
51+
-o dist/branchd-arm64/server \
52+
./cmd/server
53+
54+
echo "Building worker binary for ARM64..."
55+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build \
56+
-ldflags="-s -w -X main.version=${{ steps.version.outputs.VERSION }}" \
57+
-trimpath \
58+
-o dist/branchd-arm64/worker \
59+
./cmd/worker
60+
61+
- name: Build Go binaries (AMD64)
62+
run: |
63+
echo "Building server binary for AMD64..."
64+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
65+
-ldflags="-s -w -X main.version=${{ steps.version.outputs.VERSION }}" \
66+
-trimpath \
67+
-o dist/branchd-amd64/server \
68+
./cmd/server
69+
70+
echo "Building worker binary for AMD64..."
71+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
72+
-ldflags="-s -w -X main.version=${{ steps.version.outputs.VERSION }}" \
73+
-trimpath \
74+
-o dist/branchd-amd64/worker \
75+
./cmd/worker
76+
77+
- name: Build Web UI
78+
working-directory: web
79+
run: |
80+
echo "Installing dependencies..."
81+
bun install
82+
83+
echo "Building production bundle..."
84+
bun run build
85+
86+
- name: Create ARM64 bundle
87+
run: |
88+
mkdir -p dist/branchd-arm64/web
89+
cp -r web/dist/* dist/branchd-arm64/web/
90+
cd dist
91+
tar -czf branchd-linux-arm64.tar.gz branchd-arm64
92+
mv branchd-linux-arm64.tar.gz ..
93+
94+
- name: Create AMD64 bundle
95+
run: |
96+
mkdir -p dist/branchd-amd64/web
97+
cp -r web/dist/* dist/branchd-amd64/web/
98+
cd dist
99+
tar -czf branchd-linux-amd64.tar.gz branchd-amd64
100+
mv branchd-linux-amd64.tar.gz ..
101+
102+
- name: Build CLI binaries (Linux)
103+
run: |
104+
echo "Building CLI for Linux AMD64..."
105+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
106+
-ldflags="-s -w -X github.com/branchd-dev/branchd/internal/cli.version=${{ steps.version.outputs.VERSION }}" \
107+
-trimpath \
108+
-o dist/cli/branchd-linux-amd64 \
109+
./cmd/cli
110+
111+
echo "Building CLI for Linux ARM64..."
112+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build \
113+
-ldflags="-s -w -X github.com/branchd-dev/branchd/internal/cli.version=${{ steps.version.outputs.VERSION }}" \
114+
-trimpath \
115+
-o dist/cli/branchd-linux-arm64 \
116+
./cmd/cli
117+
118+
- name: Build CLI binaries (macOS)
119+
run: |
120+
echo "Building CLI for macOS AMD64 (Intel)..."
121+
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build \
122+
-ldflags="-s -w -X github.com/branchd-dev/branchd/internal/cli.version=${{ steps.version.outputs.VERSION }}" \
123+
-trimpath \
124+
-o dist/cli/branchd-darwin-amd64 \
125+
./cmd/cli
126+
127+
echo "Building CLI for macOS ARM64 (Apple Silicon)..."
128+
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build \
129+
-ldflags="-s -w -X github.com/branchd-dev/branchd/internal/cli.version=${{ steps.version.outputs.VERSION }}" \
130+
-trimpath \
131+
-o dist/cli/branchd-darwin-arm64 \
132+
./cmd/cli
133+
134+
- name: Build CLI binaries (Windows)
135+
run: |
136+
echo "Building CLI for Windows AMD64..."
137+
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build \
138+
-ldflags="-s -w -X github.com/branchd-dev/branchd/internal/cli.version=${{ steps.version.outputs.VERSION }}" \
139+
-trimpath \
140+
-o dist/cli/branchd-windows-amd64.exe \
141+
./cmd/cli
142+
143+
- name: Generate checksums
144+
run: |
145+
# Server bundles
146+
sha256sum branchd-linux-arm64.tar.gz > branchd-linux-arm64.tar.gz.sha256
147+
sha256sum branchd-linux-amd64.tar.gz > branchd-linux-amd64.tar.gz.sha256
148+
149+
# CLI binaries
150+
cd dist/cli
151+
sha256sum branchd-linux-amd64 > branchd-linux-amd64.sha256
152+
sha256sum branchd-linux-arm64 > branchd-linux-arm64.sha256
153+
sha256sum branchd-darwin-amd64 > branchd-darwin-amd64.sha256
154+
sha256sum branchd-darwin-arm64 > branchd-darwin-arm64.sha256
155+
sha256sum branchd-windows-amd64.exe > branchd-windows-amd64.exe.sha256
156+
cd ../..
157+
158+
- name: Create Release
159+
uses: softprops/action-gh-release@v2
160+
with:
161+
tag_name: ${{ steps.version.outputs.VERSION }}
162+
name: Branchd ${{ steps.version.outputs.VERSION }}
163+
draft: false
164+
prerelease: false
165+
generate_release_notes: true
166+
body: |
167+
## Server Bundles
168+
For self-hosted deployments on Linux servers.
169+
170+
- `branchd-linux-arm64.tar.gz` - ARM64 (AWS Graviton, etc.)
171+
- `branchd-linux-amd64.tar.gz` - x86_64/AMD64
172+
173+
## CLI Binaries
174+
Command-line tool for managing branches.
175+
176+
### Linux
177+
- `branchd-linux-amd64` - x86_64/AMD64
178+
- `branchd-linux-arm64` - ARM64
179+
180+
### macOS
181+
- `branchd-darwin-amd64` - Intel Macs
182+
- `branchd-darwin-arm64` - Apple Silicon (M1/M2/M3)
183+
184+
### Windows
185+
- `branchd-windows-amd64.exe` - x86_64/AMD64
186+
187+
All files include SHA256 checksums for verification.
188+
files: |
189+
branchd-linux-arm64.tar.gz
190+
branchd-linux-arm64.tar.gz.sha256
191+
branchd-linux-amd64.tar.gz
192+
branchd-linux-amd64.tar.gz.sha256
193+
dist/cli/branchd-linux-amd64
194+
dist/cli/branchd-linux-amd64.sha256
195+
dist/cli/branchd-linux-arm64
196+
dist/cli/branchd-linux-arm64.sha256
197+
dist/cli/branchd-darwin-amd64
198+
dist/cli/branchd-darwin-amd64.sha256
199+
dist/cli/branchd-darwin-arm64
200+
dist/cli/branchd-darwin-arm64.sha256
201+
dist/cli/branchd-windows-amd64.exe
202+
dist/cli/branchd-windows-amd64.exe.sha256

0 commit comments

Comments
 (0)