Repository navigation
703 lines (626 loc) · 26.2 KB
/
Copy pathrelease.yml
File metadata and controls
703 lines (626 loc) · 26.2 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
name: release
# Cuts a GitHub Release with all rbara artifacts when a tag matching
# v* is pushed (e.g., `git tag v0.1.3 && git push --tags`).
#
# if on powershell use the below
# git tag v0.1.3 ; if ($LASTEXITCODE -eq 0) { git push --tags }
#
# Stable tags produce the full artifact suite. Hyphenated compatibility
# iteration tags (for example v0.2.0-1) produce only rbara installers and its
# Docker image so unrelated package versions are not relabeled.
#
# Artifacts produced (one tag → one Release):
# rbara-setup-<version>-x64.exe (Windows, Inno Setup)
# rbara-<version>-linux-x64.tar.gz (Linux glibc, x86_64)
# rbara-<version>-macos-arm64.tar.gz (macOS Apple silicon)
# rbara-<version>-macos-x86_64.tar.gz (macOS Intel)
# rbara:<version> + rbara:latest (GHCR Docker image)
# rbara-gui-<version>-windows-x64-setup.exe (GUI, Windows NSIS)
# rbara-gui-<version>-windows-x64.msi (GUI, Windows MSI)
# rbara-gui-<version>-linux-x64.AppImage (GUI, Linux AppImage)
# rbara-gui-<version>-linux-x64.deb (GUI, Linux deb)
# rbara-gui-<version>-macos-arm64.dmg (GUI, macOS Apple silicon)
# rbara-gui-<version>-macos-x86_64.dmg (GUI, macOS Intel)
# rustybara-icc-<version>-windows-x64.exe (ICC CLI, Windows)
# rustybara-icc-<version>-linux-x64.tar.gz (ICC CLI, Linux)
# rustybara-icc-<version>-macos-arm64.tar.gz (ICC CLI, macOS Apple silicon)
# rustybara-icc-<version>-macos-x86_64.tar.gz (ICC CLI, macOS Intel)
#
# ICC CLI note: released binaries support --to srgb out of the box.
# For named print profiles (--from CoatedFOGRA39 etc.) build locally with:
# cargo build --release -p rustybara-icc --features bundled-profiles
#
# rbara-gui release binaries bundle all 22 Adobe ICC profiles (14 CMYK + 8 RGB)
# via the bundled-profiles feature in rbara-gui/Cargo.toml. CI has access to the
# profile files in rustybara-icc/src/profiles/data/ — they are committed under the
# Adobe Color Profile Bundling Agreement (Exhibit B). End users accept the license
# via the download modal on the rbara-gui download page.
#
# Each artifact bundles its own pdfium (chromium/7776) — no system pdfium needed.
# All four installers are independent and can run/release in parallel.
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Version tag to release (e.g. v0.1.3). Must already exist.'
required: true
type: string
permissions:
contents: write # create the release + upload assets
packages: write # push the Docker image to ghcr.io
env:
PDFIUM_CHROMIUM: '7776'
jobs:
# -------------------------------------------------------------------------
# Windows installer (Inno Setup .exe)
# -------------------------------------------------------------------------
build-windows:
name: Windows installer
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable, MSVC)
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Install Inno Setup
run: choco install innosetup --no-progress -y
shell: pwsh
- name: Build installer
shell: pwsh
run: |
.\installer\windows\build-installer.ps1 -PdfiumChromium $env:PDFIUM_CHROMIUM
- uses: actions/upload-artifact@v4
with:
name: windows-installer
path: installer/windows/dist/*.exe
if-no-files-found: error
# -------------------------------------------------------------------------
# Linux tarball (.tar.gz, x86_64-unknown-linux-gnu)
# -------------------------------------------------------------------------
build-linux:
name: Linux tarball
# Use ubuntu-22.04 (glibc 2.35) so the binary runs on any distro from
# ~2022 onward (Ubuntu 22.04+, Debian 12+, RHEL 9+, Fedora 38+).
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Install build deps
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
liblcms2-dev pkg-config curl tar bc
- name: Build installer
run: |
chmod +x installer/linux/build-installer.sh \
installer/linux/install.sh \
installer/linux/uninstall.sh
./installer/linux/build-installer.sh --pdfium-chromium "$PDFIUM_CHROMIUM"
- uses: actions/upload-artifact@v4
with:
name: linux-tarball
path: installer/linux/dist/*.tar.gz
if-no-files-found: error
# -------------------------------------------------------------------------
# macOS tarballs (Apple silicon + Intel)
# -------------------------------------------------------------------------
build-macos:
name: macOS tarball (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: arm64
runner: macos-14 # Apple silicon
target: aarch64-apple-darwin
- arch: x86_64
# Cross-compile Intel from Apple silicon: macos-13 (Intel) runners
# are deprecated and frequently queue-starved. pdfium ships a
# prebuilt mac-x64 dylib, so no native Intel host is required.
runner: macos-14
target: x86_64-apple-darwin
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable, ${{ matrix.target }})
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build installer
run: |
chmod +x installer/macos/build-installer.sh \
installer/macos/install.sh \
installer/macos/uninstall.sh
./installer/macos/build-installer.sh \
--arch "${{ matrix.arch }}" \
--pdfium-chromium "$PDFIUM_CHROMIUM"
- uses: actions/upload-artifact@v4
with:
name: macos-tarball-${{ matrix.arch }}
path: installer/macos/dist/*.tar.gz
if-no-files-found: error
# -------------------------------------------------------------------------
# Docker image → GitHub Container Registry
# -------------------------------------------------------------------------
build-docker:
name: Docker image (ghcr.io)
runs-on: ubuntu-latest
# Suppress the auto-uploaded "*.dockerbuild" build-record artifact from
# docker/build-push-action — its name contains '~' which breaks
# actions/download-artifact path handling in publish-release.
env:
DOCKER_BUILD_SUMMARY: 'false'
DOCKER_BUILD_RECORD_UPLOAD: 'false'
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Resolve version and image name
id: ver
shell: bash
run: |
tag="${{ github.event.inputs.tag || github.ref_name }}"
version="${tag#v}"
# GHCR requires lowercase repo names; owner login may contain uppercase.
owner_lc="$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "image=ghcr.io/${owner_lc}/rbara" >> "$GITHUB_OUTPUT"
- name: Build & push image
uses: docker/build-push-action@v6
with:
context: .
push: true
build-args: |
PDFIUM_CHROMIUM=${{ env.PDFIUM_CHROMIUM }}
tags: |
${{ steps.ver.outputs.image }}:${{ steps.ver.outputs.version }}
${{ steps.ver.outputs.image }}:latest
# -------------------------------------------------------------------------
# GUI builds (Tauri v2)
# -------------------------------------------------------------------------
build-gui-windows:
name: GUI — Windows installer
# Hyphenated tags are scoped rbara compatibility iterations (for example
# v0.2.0-1), not full-suite releases.
if: ${{ !contains(github.event.inputs.tag || github.ref_name, '-') }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable, MSVC)
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Install Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install frontend dependencies
working-directory: rbara-gui/frontend
run: npm ci
- name: Generate placeholder icons
shell: pwsh
run: |
$code = @'
import struct, zlib, os
def png(w, h):
def ck(t, d):
x = t + d
return struct.pack(">I", len(d)) + x + struct.pack(">I", zlib.crc32(x) & 0xffffffff)
ihdr = ck(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 6, 0, 0, 0))
raw = b"".join(b"\x00" + b"\x80\x80\x80\xff" * w for _ in range(h))
idat = ck(b"IDAT", zlib.compress(raw))
iend = ck(b"IEND", b"")
return b"\x89PNG\r\n\x1a\n" + ihdr + idat + iend
os.makedirs("rbara-gui/icons", exist_ok=True)
for name, w, h in [("icon.png",512,512),("32x32.png",32,32),("128x128.png",128,128),("128x128@2x.png",256,256)]:
p = "rbara-gui/icons/" + name
if not os.path.exists(p):
open(p, "wb").write(png(w, h))
print("Generated", p)
'@
$tmpf = [IO.Path]::GetTempFileName() + ".py"
$code | Set-Content $tmpf -Encoding utf8
python3 $tmpf
Remove-Item $tmpf
- name: Fetch pdfium (chromium/${{ env.PDFIUM_CHROMIUM }}, Windows x64)
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$url = "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F$env:PDFIUM_CHROMIUM/pdfium-win-x64.tgz"
Invoke-WebRequest $url -OutFile pdfium.tgz
New-Item -ItemType Directory -Force -Path "$env:TEMP\pdfium" | Out-Null
tar -xf pdfium.tgz -C "$env:TEMP\pdfium"
$src = "$env:TEMP\pdfium\bin\pdfium.dll"
$dest = "rbara-gui\resources\pdfium.dll"
if (-not (Test-Path -PathType Leaf $src)) {
Write-Error "ERROR: $src is not a regular file in archive"
Get-ChildItem -Recurse "$env:TEMP\pdfium" -Filter *.dll
exit 1
}
New-Item -ItemType Directory -Force -Path rbara-gui\resources | Out-Null
if (Test-Path -PathType Container $dest) { Remove-Item -Recurse -Force $dest }
if (Test-Path $dest) { Remove-Item -Force $dest }
Copy-Item $src $dest
if (-not (Test-Path -PathType Leaf $dest)) {
Write-Error "ERROR: $dest is not a regular file after copy"
Get-ChildItem rbara-gui\resources
exit 1
}
- name: Build rbv
shell: pwsh
run: cargo build --release -p rbv --target x86_64-pc-windows-msvc
- name: Copy rbv to resources
shell: pwsh
run: Copy-Item target\x86_64-pc-windows-msvc\release\rbv.exe rbara-gui\resources\rbv.exe
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: rbara-gui
args: --target x86_64-pc-windows-msvc
- name: Collect installer
shell: pwsh
run: |
$tag = "${{ github.event.inputs.tag || github.ref_name }}"
$version = $tag -replace '^v', ''
New-Item -ItemType Directory -Force -Path installer\gui\dist
Get-ChildItem -Recurse target\x86_64-pc-windows-msvc\release\bundle `
-Include *.msi, *.exe |
ForEach-Object {
$dest = if ($_.Extension -eq '.exe') {
"installer\gui\dist\rbara-gui-${version}-windows-x64-setup.exe"
} else {
"installer\gui\dist\rbara-gui-${version}-windows-x64.msi"
}
Copy-Item $_.FullName $dest
}
- uses: actions/upload-artifact@v4
with:
name: gui-windows
path: installer/gui/dist/*
if-no-files-found: error
build-gui-linux:
name: GUI — Linux AppImage + deb
if: ${{ !contains(github.event.inputs.tag || github.ref_name, '-') }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Install Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
liblcms2-dev \
pkg-config \
curl tar
- name: Install frontend dependencies
working-directory: rbara-gui/frontend
run: npm ci
- name: Generate placeholder icons
run: |
python3 - <<'PYEOF'
import struct, zlib, os
def png(w, h):
def ck(t, d):
x = t + d
return struct.pack(">I", len(d)) + x + struct.pack(">I", zlib.crc32(x) & 0xffffffff)
ihdr = ck(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 6, 0, 0, 0))
raw = b"".join(b"\x00" + b"\x80\x80\x80\xff" * w for _ in range(h))
idat = ck(b"IDAT", zlib.compress(raw))
iend = ck(b"IEND", b"")
return b"\x89PNG\r\n\x1a\n" + ihdr + idat + iend
os.makedirs("rbara-gui/icons", exist_ok=True)
for name, w, h in [("icon.png",512,512),("32x32.png",32,32),("128x128.png",128,128),("128x128@2x.png",256,256)]:
p = "rbara-gui/icons/" + name
if not os.path.exists(p):
open(p, "wb").write(png(w, h))
print("Generated", p)
PYEOF
- name: Fetch pdfium (chromium/${{ env.PDFIUM_CHROMIUM }}, Linux x64)
run: |
set -euo pipefail
curl -fsSL \
"https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_CHROMIUM}/pdfium-linux-x64.tgz" \
| tar xz -C /tmp
SRC=/tmp/lib/libpdfium.so
DEST=rbara-gui/resources/libpdfium.so
if [ ! -f "$SRC" ]; then
echo "ERROR: $SRC not a regular file in archive"
find /tmp -name '*.so*' 2>/dev/null || true
exit 1
fi
mkdir -p rbara-gui/resources
if [ -d "$DEST" ] && [ ! -L "$DEST" ]; then
rm -rf "$DEST"
fi
rm -f "$DEST"
cp "$SRC" "$DEST"
test -f "$DEST" || { echo "ERROR: $DEST is not a regular file after copy"; ls -la rbara-gui/resources; exit 1; }
- name: Build rbv
run: cargo build --release -p rbv
- name: Copy rbv to resources
run: cp target/release/rbv rbara-gui/resources/rbv
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: rbara-gui
- name: Collect bundles
run: |
tag="${{ github.event.inputs.tag || github.ref_name }}"
version="${tag#v}"
mkdir -p installer/gui/dist
find target/release/bundle -type f -name "*.AppImage" \
-exec cp {} "installer/gui/dist/rbara-gui-${version}-linux-x64.AppImage" \;
find target/release/bundle -type f -name "*.deb" \
-exec cp {} "installer/gui/dist/rbara-gui-${version}-linux-x64.deb" \;
- uses: actions/upload-artifact@v4
with:
name: gui-linux
path: installer/gui/dist/*
if-no-files-found: error
build-gui-macos:
name: GUI — macOS dmg (${{ matrix.arch }})
if: ${{ !contains(github.event.inputs.tag || github.ref_name, '-') }}
strategy:
fail-fast: false
matrix:
include:
- arch: arm64
runner: macos-14
target: aarch64-apple-darwin
pdfium_pkg: pdfium-mac-arm64.tgz
- arch: x86_64
runner: macos-14
target: x86_64-apple-darwin
pdfium_pkg: pdfium-mac-x64.tgz
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable, ${{ matrix.target }})
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install frontend dependencies
working-directory: rbara-gui/frontend
run: npm ci
- name: Generate placeholder icons
run: |
python3 - <<'PYEOF'
import struct, zlib, os
def png(w, h):
def ck(t, d):
x = t + d
return struct.pack(">I", len(d)) + x + struct.pack(">I", zlib.crc32(x) & 0xffffffff)
ihdr = ck(b"IHDR", struct.pack(">IIBBBBB", w, h, 8, 6, 0, 0, 0))
raw = b"".join(b"\x00" + b"\x80\x80\x80\xff" * w for _ in range(h))
idat = ck(b"IDAT", zlib.compress(raw))
iend = ck(b"IEND", b"")
return b"\x89PNG\r\n\x1a\n" + ihdr + idat + iend
os.makedirs("rbara-gui/icons", exist_ok=True)
for name, w, h in [("icon.png",512,512),("32x32.png",32,32),("128x128.png",128,128),("128x128@2x.png",256,256)]:
p = "rbara-gui/icons/" + name
if not os.path.exists(p):
open(p, "wb").write(png(w, h))
print("Generated", p)
PYEOF
- name: Fetch pdfium (chromium/${{ env.PDFIUM_CHROMIUM }}, ${{ matrix.arch }})
run: |
set -euo pipefail
curl -fsSL \
"https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${PDFIUM_CHROMIUM}/${{ matrix.pdfium_pkg }}" \
| tar xz -C /tmp
SRC=/tmp/lib/libpdfium.dylib
DEST=rbara-gui/resources/libpdfium.dylib
if [ ! -f "$SRC" ]; then
echo "ERROR: $SRC not a regular file in archive"
find /tmp -name '*.dylib' 2>/dev/null || true
exit 1
fi
mkdir -p rbara-gui/resources
if [ -d "$DEST" ] && [ ! -L "$DEST" ]; then
rm -rf "$DEST"
fi
rm -f "$DEST"
cp "$SRC" "$DEST"
test -f "$DEST" || { echo "ERROR: $DEST is not a regular file after copy"; ls -la rbara-gui/resources; exit 1; }
- name: Install create-dmg
run: brew install create-dmg
- name: Build rbv
run: cargo build --release -p rbv --target ${{ matrix.target }}
- name: Copy rbv to resources
run: cp target/${{ matrix.target }}/release/rbv rbara-gui/resources/rbv
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: rbara-gui
args: --target ${{ matrix.target }}
- name: Collect dmg
run: |
tag="${{ github.event.inputs.tag || github.ref_name }}"
version="${tag#v}"
mkdir -p installer/gui/dist
find target/${{ matrix.target }}/release/bundle \
-name "*.dmg" \
-exec cp {} "installer/gui/dist/rbara-gui-${version}-macos-${{ matrix.arch }}.dmg" \;
- uses: actions/upload-artifact@v4
with:
name: gui-macos-${{ matrix.arch }}
path: installer/gui/dist/*.dmg
if-no-files-found: error
# -------------------------------------------------------------------------
# rustybara-icc CLI binary (all platforms)
# -------------------------------------------------------------------------
build-icc-cli:
name: rustybara-icc CLI (${{ matrix.label }})
if: ${{ !contains(github.event.inputs.tag || github.ref_name, '-') }}
strategy:
fail-fast: false
matrix:
include:
- label: windows-x64
os: windows-latest
target: x86_64-pc-windows-msvc
binary: rustybara-icc.exe
archive_ext: exe
- label: linux-x64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
binary: rustybara-icc
archive_ext: tar.gz
- label: macos-arm64
os: macos-14
target: aarch64-apple-darwin
binary: rustybara-icc
archive_ext: tar.gz
- label: macos-x86_64
os: macos-14
target: x86_64-apple-darwin
binary: rustybara-icc
archive_ext: tar.gz
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable, ${{ matrix.target }})
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install build deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends pkg-config
- name: Build
env:
PKG_CONFIG_ALLOW_CROSS: '1'
run: cargo build --release -p rustybara-icc --target ${{ matrix.target }}
- name: Package artifact
shell: bash
run: |
tag="${{ github.event.inputs.tag || github.ref_name }}"
version="${tag#v}"
mkdir -p icc-dist
src="target/${{ matrix.target }}/release/${{ matrix.binary }}"
base="rustybara-icc-${version}-${{ matrix.label }}"
if [ "${{ matrix.archive_ext }}" = "exe" ]; then
cp "$src" "icc-dist/${base}.exe"
else
tar -czf "icc-dist/${base}.tar.gz" -C "$(dirname $src)" "$(basename $src)"
fi
- uses: actions/upload-artifact@v4
with:
name: icc-cli-${{ matrix.label }}
path: icc-dist/*
if-no-files-found: error
# -------------------------------------------------------------------------
# Publish: gather every artifact and attach to a GitHub Release
# -------------------------------------------------------------------------
publish-release:
name: Publish GitHub Release
needs:
[
build-windows,
build-linux,
build-macos,
build-docker,
build-gui-windows,
build-gui-linux,
build-gui-macos,
build-icc-cli,
]
# Skipped GUI/ICC jobs are expected for rbara-only iteration tags. Still
# block publication if any job that did run failed or was cancelled.
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
# Only our explicit installer artifacts. docker/build-push-action
# auto-uploads a "*.dockerbuild" build-record artifact whose name
# contains '~' and breaks download paths — skip it.
pattern: '{windows-installer,linux-tarball,macos-tarball-*,gui-windows,gui-linux,gui-macos-*,icc-cli-*}'
- name: Flatten artifact tree
run: |
mkdir -p release-files
find dist -type f \( -name '*.exe' -o -name '*.tar.gz' -o -name '*.msi' -o -name '*.AppImage' -o -name '*.deb' -o -name '*.dmg' \) -exec cp {} release-files/ \;
ls -lh release-files
- name: Generate SHA256 checksums
run: |
cd release-files
sha256sum * > SHA256SUMS.txt
cat SHA256SUMS.txt
- name: Resolve tag
id: tag
run: |
tag="${{ github.event.inputs.tag || github.ref_name }}"
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Generate release body
shell: bash
run: |
tag="${{ steps.tag.outputs.tag }}"
if [[ "$tag" == *-* ]]; then
cat > RELEASE_BODY.md <<EOF
## rbara $tag
Compatibility iteration containing the self-contained rbara CLI/TUI
artifacts only. GUI and rustybara-icc artifacts retain their existing
versions and are intentionally excluded.
| Platform | Asset |
|---|---|
| Windows | \`rbara-setup-*-x64.exe\` |
| Linux (glibc x86_64) | \`rbara-*-linux-x64.tar.gz\` |
| macOS (Apple silicon) | \`rbara-*-macos-arm64.tar.gz\` |
| macOS (Intel) | \`rbara-*-macos-x86_64.tar.gz\` |
| Docker | \`ghcr.io/addy-a/rbara:${tag#v}\` |
See \`SHA256SUMS.txt\` for checksums.
EOF
else
cat > RELEASE_BODY.md <<EOF
## rbara $tag
Full-suite release with self-contained rbara installers, rbara-gui
desktop packages, rustybara-icc binaries, and the rbara Docker image.
See \`SHA256SUMS.txt\` for checksums and the
[README](https://github.com/${{ github.repository }}#installation) for
platform-specific installation instructions.
EOF
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: rbara ${{ steps.tag.outputs.tag }}
generate_release_notes: true
prerelease: ${{ contains(steps.tag.outputs.tag, '-') }}
files: |
release-files/*
body_path: RELEASE_BODY.md