Repository navigation
230 lines (223 loc) · 9.11 KB
/
Copy pathrelease.yml
File metadata and controls
230 lines (223 loc) · 9.11 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
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
macos:
name: macOS (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- { arch: arm64, runner: macos-latest, racket-arch: arm64 }
- { arch: x64, runner: macos-15-intel, racket-arch: x64 }
steps:
- uses: actions/checkout@v4
- name: Set up Racket CS
uses: Bogdanp/setup-racket@v1.15
with:
architecture: ${{ matrix.racket-arch }}
distribution: full
variant: CS
version: '9.3'
- name: Install Rivet (catalog)
run: raco pkg install --auto --no-docs rivet
- name: Version preflight (VERSION == rivet.rktd == updater == tag)
run: bash scripts/check-release-version.sh "${{ github.ref_name }}"
# DMG (human installer) + portable zip + SBOM + notices, launch
# smoke included. The macOS update feed entry is the portable zip,
# assembled by scripts/make-update-manifest.sh in the publish job.
- name: Release (DMG + portable zip)
run: raco rivet release --without-updates --development
- name: Family naming + checksums
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
ARCH="${{ matrix.arch }}"
cd dist
# rivet 0.6.1 names the portable zip in family form already; only
# the DMG lacks the architecture.
mv "taskly-${VERSION}-macos.dmg" "taskly-${VERSION}-macos-${ARCH}.dmg"
mv sbom.cdx.json "taskly-${VERSION}-macos-${ARCH}.sbom.cdx.json"
mv THIRD_PARTY_NOTICES.txt "taskly-${VERSION}-macos-${ARCH}-THIRD_PARTY_NOTICES.txt"
for f in taskly-*; do
case "$f" in
*.sha256) ;;
# The sbom/notices/wixpdb bodies stay in the CI artifact only;
# a sidecar without its body on the release is a dangling
# reference (the 1.4.0 leftover). Checksum what we upload.
*.sbom.cdx.json | *-THIRD_PARTY_NOTICES.txt | *.wixpdb) ;;
*) [ -f "$f" ] || continue; [ -f "$f.sha256" ] || shasum -a 256 "$f" > "$f.sha256";;
esac
done
- uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.arch }}
path: dist/taskly-*
windows:
name: Windows (x64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Racket CS
uses: Bogdanp/setup-racket@v1.15
with:
architecture: x64
distribution: full
variant: CS
version: '9.3'
- name: Install Rivet (catalog)
shell: pwsh
run: raco pkg install --auto --no-docs rivet
- name: Install WiX (v5; rivet's MSI toolchain)
run: dotnet tool install --global wix --version 5.0.2
shell: bash
- name: Install crypto (updater dependency)
run: raco pkg install --auto --no-docs crypto
shell: pwsh
- name: Version preflight (VERSION == rivet.rktd == updater == tag)
shell: bash
run: bash scripts/check-release-version.sh "${{ github.ref_name }}"
- name: Release (MSI + portable zip)
shell: pwsh
run: raco rivet release --without-updates --development
- name: Family naming + checksums
shell: bash
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
cd dist
# rivet 0.6.1 names msi and portable zip in family form already.
mv sbom.cdx.json "taskly-${VERSION}-windows-x64.sbom.cdx.json"
mv THIRD_PARTY_NOTICES.txt "taskly-${VERSION}-windows-x64-THIRD_PARTY_NOTICES.txt"
for f in taskly-*; do
case "$f" in
*.sha256) ;;
# The sbom/notices/wixpdb bodies stay in the CI artifact only;
# a sidecar without its body on the release is a dangling
# reference (the 1.4.0 leftover). Checksum what we upload.
*.sbom.cdx.json | *-THIRD_PARTY_NOTICES.txt | *.wixpdb) ;;
*) [ -f "$f" ] || continue; [ -f "$f.sha256" ] || sha256sum "$f" > "$f.sha256";;
esac
done
- uses: actions/upload-artifact@v4
with:
name: windows
path: dist/taskly-*
linux:
name: Linux (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- { arch: x64, runner: ubuntu-latest, racket-arch: x64 }
- { arch: arm64, runner: ubuntu-24.04-arm, racket-arch: arm64 }
steps:
- uses: actions/checkout@v4
- name: Set up embeddable Racket CS
uses: turinglambdaai/rivet/.github/actions/setup-embed-racket@main
# Installed after the embeddable runtime so the catalog dependency
# closure (cext-lib, crypto-lib, keel) resolves against the minimal
# build — it ships no packages of its own. db backs taskly's storage;
# crypto backs the updater's signing.
- name: Install Rivet (catalog) and backend packages
run: |
raco pkg install --auto --no-docs rivet
raco pkg install --auto --no-docs db crypto
- name: Install GTK4, rpm and packaging tooling
run: |
sudo apt-get update
sudo apt-get install --yes \
libgtk-4-dev libadwaita-1-dev libjson-glib-dev libsecret-1-dev \
libglib2.0-dev cmake ninja-build pkg-config file \
rpm desktop-file-utils
- name: Version preflight (VERSION == rivet.rktd == updater == tag)
run: bash scripts/check-release-version.sh "${{ github.ref_name }}"
# tar.gz (the update-feed payload) + deb + rpm + AppImage + portable
# zip + SBOM, launch smoke included. The AppImage carries its own
# GTK4 dependency closure; APPIMAGE_EXTRACT_AND_RUN lets
# appimagetool run on the runner.
- name: Release (tar.gz + deb + rpm + AppImage + portable zip)
env:
APPIMAGE_EXTRACT_AND_RUN: '1'
run: raco rivet release --without-updates --development
- name: Family naming + checksums
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
ARCH="${{ matrix.arch }}"
cd dist
mv sbom.cdx.json "taskly-${VERSION}-linux-${ARCH}.sbom.cdx.json"
mv THIRD_PARTY_NOTICES.txt "taskly-${VERSION}-linux-${ARCH}-THIRD_PARTY_NOTICES.txt"
for f in taskly-*; do
case "$f" in
*.sha256) ;;
# The sbom/notices/wixpdb bodies stay in the CI artifact only;
# a sidecar without its body on the release is a dangling
# reference (the 1.4.0 leftover). Checksum what we upload.
*.sbom.cdx.json | *-THIRD_PARTY_NOTICES.txt | *.wixpdb) ;;
*) [ -f "$f" ] || continue; [ -f "$f.sha256" ] || sha256sum "$f" > "$f.sha256" ;;
esac
done
- uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch }}
path: dist/taskly-*
publish:
name: Publish
needs: [macos, windows, linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Racket CS
uses: Bogdanp/setup-racket@v1.15
with:
architecture: x64
distribution: full
variant: CS
version: '9.3'
- name: Install Rivet (catalog)
run: raco pkg install --auto --no-docs rivet
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Gather + sign the update feed + publish
env:
GH_TOKEN: ${{ github.token }}
UPDATE_ED25519_PRIVATE_KEY: ${{ secrets.UPDATE_ED25519_PRIVATE_KEY }}
run: |
set -euo pipefail
VERSION="${GITHUB_REF_NAME#v}"
mkdir -p dist
mv artifacts/macos-arm64/* artifacts/macos-x64/* artifacts/windows/* \
artifacts/linux-x64/* artifacts/linux-arm64/* dist/
# The portable zips are the update feed (macOS/Windows hosts swap
# them in place; Linux updates through the tar.gz). Missing
# secret → warn and publish without a manifest.
if [[ -n "${UPDATE_ED25519_PRIVATE_KEY:-}" ]]; then
KEY_PEM="$RUNNER_TEMP/update-signing-key.pem"
printf '%s\n' "$UPDATE_ED25519_PRIVATE_KEY" > "$KEY_PEM"
scripts/make-update-manifest.sh "$GITHUB_REF_NAME" dist "$KEY_PEM"
else
echo "::warning::UPDATE_ED25519_PRIVATE_KEY not set — release ships without an update manifest"
fi
awk -v header="## [${VERSION}]" '
index($0, header) == 1 {on=1; next}
on && /^## / {exit}
on {print}
' CHANGELOG.md > /tmp/notes.md
cd dist
for f in *.sha256; do [ -s "$f" ] || rm -f "$f"; done
cat *.sha256 > SHA256SUMS
gh release create "$GITHUB_REF_NAME" \
--title "Taskly ${VERSION}" \
--notes-file /tmp/notes.md \
*.zip *.tar.gz *.dmg *.msi *.deb *.rpm *.AppImage \
*.sha256 SHA256SUMS update-manifest.json