forked from DonutWare/Fladder
-
Notifications
You must be signed in to change notification settings - Fork 0
279 lines (264 loc) · 11.5 KB
/
Copy pathrelease.yml
File metadata and controls
279 lines (264 loc) · 11.5 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
name: Release Driftfin
# Fork-owned release pipeline. Builds the three targets Driftfin cares about
# (Web, Windows, iOS-unsigned) and publishes a GitHub Release with the binaries.
# The upstream Fladder pipeline (build.yml.disabled) is disabled — it needs
# secrets (Android keystore, Play Console, a GitHub App) this fork does not have.
#
# To cut a release: git tag vX.Y.Z && git push origin vX.Y.Z (see CLAUDE.md → Releases)
# Or run manually from the Actions tab (workflow_dispatch) for a dry build.
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.v.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: v
shell: bash
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
V="${GITHUB_REF_NAME#v}"
else
V="$(grep '^version:' pubspec.yaml | cut -d: -f2 | cut -d+ -f1 | tr -d ' ')-dev"
fi
echo "version=$V" >> "$GITHUB_OUTPUT"
echo "Driftfin version: $V"
web:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- run: flutter pub get
- run: flutter build web --release --build-number=${{ github.run_number }}
- name: Zip web bundle
run: cd build/web && zip -r "../../Driftfin-Web-${{ needs.version.outputs.version }}.zip" .
- uses: actions/upload-artifact@v4
with:
name: web
path: Driftfin-Web-*.zip
windows:
needs: version
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- run: flutter pub get
- run: flutter build windows --release --build-number=${{ github.run_number }}
- name: Zip Windows bundle (portable)
run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath "Driftfin-Windows-${{ needs.version.outputs.version }}.zip"
- name: Compile Inno Setup installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
with:
path: windows/windows_setup.iss
options: /O+ /DDRIFTFIN_VERSION="${{ needs.version.outputs.version }}"
- name: Rename installer
run: Move-Item windows\Output\driftfin_setup.exe "Driftfin-Windows-${{ needs.version.outputs.version }}-Setup.exe"
- uses: actions/upload-artifact@v4
with:
name: windows
path: |
Driftfin-Windows-*.zip
Driftfin-Windows-*-Setup.exe
# Deploys the landing page (site/) at the Pages root and the web app under
# /app/ (https://hamadtheironside.github.io/Driftfin/ and .../Driftfin/app/).
# The app must use --base-href "/Driftfin/app/" because it's served from that
# subpath; without it Flutter requests assets from "/" and the page renders blank.
pages:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- run: flutter pub get
- run: flutter build web --release --base-href "/Driftfin/app/" --build-number=${{ github.run_number }}
- name: Assemble Pages publish dir (landing site + app)
run: |
mkdir -p dist-pages/app
cp -r site/. dist-pages/
cp -r build/web/. dist-pages/app/
# keep_files: true — this branch also hosts the Jellyfin plugin-repository
# manifest (deployed by plugin.yaml under /jellyfin-plugin/); don't delete it.
- name: Deploy to GitHub Pages
if: startsWith(github.ref, 'refs/tags/')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist-pages
keep_files: true
ios:
needs: version
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- run: flutter pub get
- name: Build iOS (unsigned)
run: flutter build ios --release --no-codesign --flavor production --build-number=${{ github.run_number }}
- name: Package unsigned .ipa
run: |
cd build/ios/iphoneos
mkdir -p Payload
cp -R Runner.app Payload/Runner.app
zip -qr "../../../Driftfin-iOS-${{ needs.version.outputs.version }}-unsigned.ipa" Payload
- uses: actions/upload-artifact@v4
with:
name: ios
path: Driftfin-iOS-*.ipa
# Ships two APK sets per ABI:
# - release (AOT, fast) — the download most users want. Signed with your own key
# when the KEYSTORE_BASE_64 secret + passwords are set; otherwise app/build.gradle
# falls back to the debug key so the build still succeeds (debug-signed release).
# - debug (`-debug` suffix) — slower, but has Flutter assertions on and readable
# logs; handy for reproducing/diagnosing bug reports. Doubles this job's runtime.
android:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- name: Configure release signing (if secrets present)
env:
KEYSTORE_BASE_64: ${{ secrets.KEYSTORE_BASE_64 }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: |
if [ -n "$KEYSTORE_BASE_64" ]; then
echo "$KEYSTORE_BASE_64" | base64 -d > android/app/keystore.jks
printf 'storePassword=%s\nkeyPassword=%s\nkeyAlias=%s\n' \
"$RELEASE_KEYSTORE_PASSWORD" "$RELEASE_KEY_PASSWORD" "$RELEASE_KEYSTORE_ALIAS" \
> android/app/key.properties
echo "Release keystore configured — APKs will be release-signed."
else
echo "No KEYSTORE_BASE_64 secret set — release APKs will be debug-signed."
fi
- run: flutter pub get
- name: Build Android APKs (release)
# checkProductionReleaseDuplicateClasses (Jetifier) flakes intermittently; retry once.
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
command: flutter build apk --release --split-per-abi --flavor production --build-number=${{ github.run_number }}
- name: Build Android APKs (debug)
# checkProductionDebugDuplicateClasses (Jetifier) flakes intermittently; retry once.
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
command: flutter build apk --debug --split-per-abi --flavor production --build-number=${{ github.run_number }}
- name: Collect APKs
run: |
mkdir -p dist-apk
for abi in armeabi-v7a arm64-v8a x86_64; do
cp "build/app/outputs/flutter-apk/app-${abi}-production-release.apk" \
"dist-apk/Driftfin-Android-${{ needs.version.outputs.version }}-${abi}.apk" || true
cp "build/app/outputs/flutter-apk/app-${abi}-production-debug.apk" \
"dist-apk/Driftfin-Android-${{ needs.version.outputs.version }}-${abi}-debug.apk" || true
done
- uses: actions/upload-artifact@v4
with:
name: android
path: dist-apk/*.apk
macos_desktop:
needs: version
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- run: flutter pub get
- run: flutter build macos --release --flavor production --build-number=${{ github.run_number }}
- name: Zip .app
run: |
APP=$(find build/macos/Build/Products -maxdepth 2 -name "*.app" | head -1)
echo "Packaging: $APP"
ditto -c -k --keepParent "$APP" "Driftfin-macOS-${{ needs.version.outputs.version }}.zip"
- uses: actions/upload-artifact@v4
with:
name: macos
path: Driftfin-macOS-*.zip
linux:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version-file: .fvmrc
cache: true
- name: Install Linux build deps
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev patchelf cmake clang libfuse2 libcurl4-openssl-dev
- run: flutter pub get
- run: flutter build linux --release --build-number=${{ github.run_number }}
- name: Zip bundle
run: cd build/linux/x64/release/bundle && zip -r "$GITHUB_WORKSPACE/Driftfin-Linux-${{ needs.version.outputs.version }}.zip" .
- uses: actions/upload-artifact@v4
with:
name: linux
path: Driftfin-Linux-*.zip
release:
needs: [version, web, windows, ios, android, macos_desktop, linux]
# Publish even if one platform fails, but only for real tag pushes.
if: always() && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: List artifacts
run: ls -R dist || echo "(no artifacts)"
- uses: softprops/action-gh-release@v2
with:
name: Driftfin ${{ needs.version.outputs.version }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, 'nightly') }}
fail_on_unmatched_files: false
files: dist/**/*
body: |
**Driftfin ${{ needs.version.outputs.version }}** — a cross-platform Jellyfin client.
Driftfin is a fork of [Fladder](https://github.com/DonutWare/Fladder) by DonutWare, continued under the same **GPL-3.0** license. All credit for the original application goes to the Fladder authors.
### Downloads
- **Web** (`Driftfin-Web-*.zip`) — unzip and serve behind any static host; open in a browser.
- **Windows installer** (`Driftfin-Windows-*-Setup.exe`) — recommended; installs to your user profile with Start Menu shortcuts.
- **Windows portable** (`Driftfin-Windows-*.zip`) — unzip and run `driftfin.exe`; supports in-app self-update.
- **iOS** (`Driftfin-iOS-*-unsigned.ipa`) — **unsigned** (no Apple Developer cert in CI); sideload with AltStore / Sideloadly or re-sign yourself.
- **Android** (`Driftfin-Android-*.apk`) — **release** build (AOT-optimized); the recommended download. Install the APK matching your device's ABI. Signed with the project release key when configured, otherwise debug-signed.
- **Android debug** (`Driftfin-Android-*-debug.apk`) — slower debug build with assertions and verbose logs; only grab this if you're reproducing a bug for a report.
- **macOS** (`Driftfin-macOS-*.zip`) — unsigned `.app`; unzip and run (you may need to allow it in Gatekeeper).
- **Linux** (`Driftfin-Linux-*.zip`) — portable bundle; needs `libmpv` (`sudo apt install libmpv-dev`). Unzip and run `driftfin`.