From dae5faa99dd588c2a0b664b7618b0910c3b973f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20B=C3=A9k=C3=A9si?= Date: Tue, 23 Jun 2026 10:19:50 +0200 Subject: [PATCH] ci: update bee version on release in quickstart command --- .github/workflows/update-bee-version.yaml | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/update-bee-version.yaml diff --git a/.github/workflows/update-bee-version.yaml b/.github/workflows/update-bee-version.yaml new file mode 100644 index 00000000..b7c71325 --- /dev/null +++ b/.github/workflows/update-bee-version.yaml @@ -0,0 +1,51 @@ +name: Update Bee version + +on: + workflow_dispatch: + inputs: + version: + description: 'Bee version (e.g. v2.9.0)' + required: true + +env: + VERSION: ${{ github.event.inputs.version }} + +jobs: + update-bee-version: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate version + run: | + if ! printf '%s' "$VERSION" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9.-]+)?$'; then + echo "invalid version: $VERSION" >&2; exit 1 + fi + + - name: Update beeVersion in quickstart.ts + run: | + sed -i "s/const beeVersion = 'v[^']*'/const beeVersion = '${VERSION}'/" src/command/quickstart.ts + grep -q "const beeVersion = '${VERSION}'" src/command/quickstart.ts || { echo 'sed did not match'; exit 1; } + + - name: Generate App token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.BEE_RUNNER_APP_ID }} + private-key: ${{ secrets.BEE_RUNNER_KEY }} + + - name: Create pull request + uses: peter-evans/create-pull-request@v8.1.1 + with: + token: ${{ steps.app-token.outputs.token }} + commit-message: 'chore: update Bee to ${{ env.VERSION }}' + branch: update-bee-${{ env.VERSION }} + title: 'chore: update Bee to ${{ env.VERSION }}' + body: | + Automated update of the Bee binary version to `${{ env.VERSION }}` in `quickstart.ts`. + labels: dependencies