From 59b7c619c7c29d616e4efcac2e150881e2e8ccc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Tue, 5 May 2026 10:35:08 +0200 Subject: [PATCH 1/6] ci: dispatch event to create-swarm-app when released --- .github/workflows/dispatch-release.yml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/dispatch-release.yml diff --git a/.github/workflows/dispatch-release.yml b/.github/workflows/dispatch-release.yml new file mode 100644 index 00000000..bf00660c --- /dev/null +++ b/.github/workflows/dispatch-release.yml @@ -0,0 +1,32 @@ +name: Dispatch release to create-swarm-app + +on: + release: + types: [published] + +jobs: + dispatch: + runs-on: ubuntu-latest + + steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.RELEASE_DISPATCHER_APP_ID }} + private-key: ${{ secrets.RELEASE_DISPATCHER_PRIVATE_KEY }} + repositories: create-swarm-app + + - name: Dispatch release event to create-swarm-app + uses: actions/github-script@v7 + with: + github-token: ${{ steps.app-token.outputs.token }} + script: | + await github.rest.repos.createDispatchEvent({ + owner: 'ethersphere', + repo: 'create-swarm-app', + event_type: 'bee-js-released', + client_payload: { + version: context.payload.release.tag_name.replace(/^v/, '') + } + }) From 0ae8df428d11dd65700219f1ccb48b21d7344db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Tue, 12 May 2026 15:20:16 +0200 Subject: [PATCH 2/6] fix: update ci deposit commands --- .github/workflows/tests.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 124f0245..18b3f52a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -35,11 +35,11 @@ jobs: - name: Deposit to chequebook run: | - swarm-cli cheque deposit 100000000000000000 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:11633 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:21633 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:31633 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:41633 + swarm-cli cheque deposit 10 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:11633 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:21633 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:31633 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:41633 - name: Create managed postage batch run: echo "JEST_MANAGED_BATCH_ID=$(swarm-cli stamp buy --depth 20 --amount 1b --quiet)" >> $GITHUB_ENV From 5d7b56bc502dcb1798e65407ce6d0d580f418572 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 13:29:13 +0000 Subject: [PATCH 3/6] test: update test coverage From 3da9cf1d89e4b5a2674917cde682dd02f5ef2d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Wed, 13 May 2026 09:43:58 +0200 Subject: [PATCH 4/6] fix: update rc workflow as well --- .github/workflows/tests-rc.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests-rc.yaml b/.github/workflows/tests-rc.yaml index dd4c3ea4..f0a76afe 100644 --- a/.github/workflows/tests-rc.yaml +++ b/.github/workflows/tests-rc.yaml @@ -51,11 +51,11 @@ jobs: - name: Deposit to chequebook run: | - swarm-cli cheque deposit 100000000000000000 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:11633 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:21633 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:31633 - swarm-cli cheque deposit 100000000000000000 --bee-api-url http://localhost:41633 + swarm-cli cheque deposit 10 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:11633 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:21633 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:31633 + swarm-cli cheque deposit 10 --bee-api-url http://localhost:41633 - name: Create managed postage batch run: echo "JEST_MANAGED_BATCH_ID=$(swarm-cli stamp buy --depth 20 --amount 1b --quiet)" >> $GITHUB_ENV From 6a13658954dbd4c16c3782f2e95ce4637e205525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Wed, 13 May 2026 11:26:20 +0200 Subject: [PATCH 5/6] ci: update coverage comparision logic --- .github/workflows/tests.yaml | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 18b3f52a..4ca29341 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -59,11 +59,38 @@ jobs: echo "exit_code=$?" >> $GITHUB_OUTPUT set -e - - name: Compare coverage + - name: Upload coverage + if: github.ref == 'refs/heads/master' + uses: actions/upload-artifact@v4 + with: + name: coverage-master + path: test/coverage/coverage-summary.json + + - name: Get master run ID if: github.ref != 'refs/heads/master' - run: - npxie coverage-comparison "${{ github.repository }}" "master" "${{ github.head_ref }}" - "test/coverage/coverage-summary.json" "${{ github.event.pull_request.number }}" "${{ secrets.GITHUB_TOKEN }}" + id: get-run-id + continue-on-error: true + env: + GH_TOKEN: ${{ github.token }} + run: | + RUN_ID=$(gh run list --branch master --workflow tests.yaml --limit 1 --json databaseId --jq '.[0].databaseId') + echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT + + - name: Download master coverage + if: github.ref != 'refs/heads/master' + id: download-coverage + continue-on-error: true + uses: actions/download-artifact@v4 + with: + name: coverage-master + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ steps.get-run-id.outputs.run-id }} + path: coverage-master + + - name: Compare coverage + if: github.ref != 'refs/heads/master' && steps.download-coverage.outcome == 'success' + run: | + npxie coverage-comparison "${{ github.repository }}" "./coverage-master/coverage-summary.json" "test/coverage/coverage-summary.json" "${{ github.event.pull_request.number }}" "${{ secrets.GITHUB_TOKEN }}" - name: Fail if tests failed if: steps.tests.outputs.exit_code != '0' From d585e6b5209bed55a7a888029ce43660b39a4d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Thu, 14 May 2026 12:56:32 +0200 Subject: [PATCH 6/6] fix: address review suggestions --- .github/workflows/dispatch-release.yml | 51 +++++++++++++------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/dispatch-release.yml b/.github/workflows/dispatch-release.yml index bf00660c..f162c080 100644 --- a/.github/workflows/dispatch-release.yml +++ b/.github/workflows/dispatch-release.yml @@ -1,32 +1,33 @@ name: Dispatch release to create-swarm-app on: - release: - types: [published] + release: + types: [published] jobs: - dispatch: - runs-on: ubuntu-latest + dispatch: + if: github.event.release.prerelease == false && github.event.release.draft == false + runs-on: ubuntu-latest - steps: - - name: Generate GitHub App token - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.RELEASE_DISPATCHER_APP_ID }} - private-key: ${{ secrets.RELEASE_DISPATCHER_PRIVATE_KEY }} - repositories: create-swarm-app + steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.BEE_RUNNER_CLIENT_ID }} + private-key: ${{ secrets.BEE_RUNNER_KEY }} + repositories: create-swarm-app - - name: Dispatch release event to create-swarm-app - uses: actions/github-script@v7 - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - await github.rest.repos.createDispatchEvent({ - owner: 'ethersphere', - repo: 'create-swarm-app', - event_type: 'bee-js-released', - client_payload: { - version: context.payload.release.tag_name.replace(/^v/, '') - } - }) + - name: Dispatch release event to create-swarm-app + uses: actions/github-script@v7 + with: + github-token: ${{ steps.app-token.outputs.token }} + script: | + await github.rest.repos.createDispatchEvent({ + owner: 'ethersphere', + repo: 'create-swarm-app', + event_type: 'bee-js-released', + client_payload: { + version: context.payload.release.tag_name.replace(/^v/, '') + } + })