From 147c09ae64b1dd3249b56f9cf06a762faf72dcc4 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 25 Apr 2026 11:42:26 +0200 Subject: [PATCH] automatically update versions in Cloudflare KV store --- .github/workflows/dev_release.yml | 8 ++++++++ .github/workflows/stable_release.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/dev_release.yml b/.github/workflows/dev_release.yml index e68ac55b4..04365a655 100644 --- a/.github/workflows/dev_release.yml +++ b/.github/workflows/dev_release.yml @@ -77,3 +77,11 @@ jobs: files: | CHANGELOG_LATEST.md ./build/firmware/*.* + + - name: Update version in Cloudflare KV store + run: | + JSON_DATA='{"version": "${{steps.build_info.outputs.VERSION}}", "date": "$(date -u +%Y-%m-%d)"}' + curl -X PUT "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CF_ACCOUNT_ID }}/storage/kv/namespaces/${{ secrets.CF_NAMESPACE_ID }}/values/dev" \ + -H "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" \ + -H "Content-Type: text/plain" \ + -d "$JSON_DATA" diff --git a/.github/workflows/stable_release.yml b/.github/workflows/stable_release.yml index 6286e6ea3..d18cd52b9 100644 --- a/.github/workflows/stable_release.yml +++ b/.github/workflows/stable_release.yml @@ -61,3 +61,11 @@ jobs: files: | CHANGELOG.md ./build/firmware/*.* + + - name: Update version in Cloudflare KV store + run: | + JSON_DATA='{"version": "${{ github.event.release.tag_name }}", "date": "$(date -u +%Y-%m-%d)"}' + curl -X PUT "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CF_ACCOUNT_ID }}/storage/kv/namespaces/${{ secrets.CF_NAMESPACE_ID }}/values/stable" \ + -H "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" \ + -H "Content-Type: text/plain" \ + -d "$JSON_DATA"