Skip to content

Commit 18e6fd4

Browse files
committed
fix(configurator): get the actual latest firmware version
1 parent 01d08b0 commit 18e6fd4

File tree

4 files changed

+240
-182
lines changed

4 files changed

+240
-182
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ jobs:
290290
# Restore CNAME
291291
cp temp-preserve/CNAME gh-pages/CNAME 2>/dev/null || true
292292
293+
# Update version.json with latest firmware version
294+
FP_VERSION="${{ needs.detect-changes.outputs.faderpunk_version }}"
295+
echo "{\"firmware\":\"${FP_VERSION}\"}" > gh-pages/version.json
296+
293297
cd gh-pages
294298
git checkout gh-pages
295299
git config user.name "github-actions[bot]"
@@ -298,6 +302,27 @@ jobs:
298302
git commit -m "Deploy configurator v${VERSION} and update landing page" || echo "No changes"
299303
git push origin gh-pages
300304
305+
# --- Update version.json on GitHub Pages (for landing page runtime check) ---
306+
update-version-json:
307+
needs: [detect-changes, release]
308+
if: needs.detect-changes.outputs.faderpunk == 'true' && needs.detect-changes.outputs.configurator != 'true'
309+
runs-on: ubuntu-latest
310+
steps:
311+
- name: Checkout gh-pages branch
312+
uses: actions/checkout@v6
313+
with:
314+
ref: gh-pages
315+
- name: Write version.json
316+
run: |
317+
echo '{"firmware":"${{ needs.detect-changes.outputs.faderpunk_version }}"}' > version.json
318+
- name: Commit and push
319+
run: |
320+
git config user.name "github-actions[bot]"
321+
git config user.email "github-actions[bot]@users.noreply.github.com"
322+
git add version.json
323+
git commit -m "Update firmware version to v${{ needs.detect-changes.outputs.faderpunk_version }}" || echo "No changes"
324+
git push origin gh-pages
325+
301326
# --- Publish libfp to crates.io ---
302327
publish-libfp:
303328
needs: [detect-changes, release]

0 commit comments

Comments
 (0)