From 1f7f012835b88f2c31e819c34d32c1d837bf9868 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Aug 2026 09:55:32 +0000 Subject: [PATCH 1/3] Publish a rolling dev release with build artifacts Port ModbusAdapter's latest-dev release mechanism: cache the Linux AppImage and Windows zip between jobs, then publish/overwrite a prerelease tagged latest-dev on every push to master via softprops/action-gh-release. --- .github/workflows/ccpp.yml | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 83eacda..82750ed 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -26,6 +26,12 @@ jobs: name: modbussim-linux path: ModbusSim*.AppImage + - name: Cache Linux artifact + uses: actions/cache/save@v6 + with: + path: ModbusSim*.AppImage + key: linux-artifact-${{ github.run_id }} + windows: runs-on: windows-2022 @@ -52,3 +58,66 @@ jobs: name: modbusscope-windows path: | ModbusSim.zip + + - name: Cache Windows artifact + uses: actions/cache/save@v6 + with: + path: ModbusSim.zip + key: windows-artifact-${{ github.run_id }} + enableCrossOsArchive: true + + package: + runs-on: ubuntu-latest + needs: [linux, windows] + if: github.ref == 'refs/heads/master' + permissions: + contents: write + actions: read + + steps: + - uses: actions/checkout@v7.0.0 + + - name: Wait for caches to propagate + env: + GH_TOKEN: ${{ github.token }} + run: | + wait_for_key() { + local key="$1" + echo "Waiting for cache key: $key" + for i in $(seq 1 12); do + if gh cache list --repo ${{ github.repository }} --key "$key" | grep -q "$key"; then + echo " $key available"; return 0 + fi + echo " not yet (attempt $i/12), retrying in 10s..." + sleep 10 + done + echo " timed out after 2 minutes waiting for $key"; return 1 + } + wait_for_key "linux-artifact-${{ github.run_id }}" & P1=$! + wait_for_key "windows-artifact-${{ github.run_id }}" & P2=$! + wait $P1 && wait $P2 + + - name: Restore Linux artifact + uses: actions/cache/restore@v6 + with: + path: ModbusSim*.AppImage + key: linux-artifact-${{ github.run_id }} + fail-on-cache-miss: true + + - name: Restore Windows artifact + uses: actions/cache/restore@v6 + with: + path: ModbusSim.zip + key: windows-artifact-${{ github.run_id }} + enableCrossOsArchive: true + fail-on-cache-miss: true + + - name: Publish dev release + uses: softprops/action-gh-release@v3.0.0 + with: + tag_name: latest-dev + name: Latest development build + prerelease: true + files: | + ModbusSim*.AppImage + ModbusSim.zip From ea9403e65b610c0258fd040c9b0efa9fdb202d38 Mon Sep 17 00:00:00 2001 From: Jens Geudens Date: Wed, 26 Aug 2026 14:50:24 +0200 Subject: [PATCH 2/3] Apply suggestion from @jgeudens --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 82750ed..ac587b8 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -55,7 +55,7 @@ jobs: - uses: actions/upload-artifact@v7.0.0 with: - name: modbusscope-windows + name: modbussim-windows path: | ModbusSim.zip From fd7575663d542a857228999ffd8c337899bcdf39 Mon Sep 17 00:00:00 2001 From: Jens Geudens Date: Wed, 26 Aug 2026 15:03:00 +0200 Subject: [PATCH 3/3] Force-update latest-dev tag to current commit before publishing release softprops/action-gh-release reuses an existing tag as-is and does not move it, so the rolling latest-dev release could end up with assets attached but the tag still pointing at an older commit. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ccpp.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index ac587b8..5763cc6 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -112,6 +112,11 @@ jobs: enableCrossOsArchive: true fail-on-cache-miss: true + - name: Move latest-dev tag to current commit + run: | + git tag -f latest-dev ${{ github.sha }} + git push origin latest-dev --force + - name: Publish dev release uses: softprops/action-gh-release@v3.0.0 with: