From 6f3920a9aca2caf93965352b92a4a89f03bd9410 Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Tue, 12 May 2026 09:22:40 +0800 Subject: [PATCH 1/2] chore: update workflow --- .github/workflows/post-release.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index c64de5754..a51fd1bca 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -1,8 +1,12 @@ name: Post release after develop synced on: - repository_dispatch: - types: [develop-synced] + workflow_dispatch: + inputs: + version: + description: 'Release version, e.g. 1.2.3' + required: true + type: string jobs: post_release: @@ -12,19 +16,19 @@ jobs: contents: write steps: - - name: Read version from repository_dispatch payload + - name: Read version from workflow_dispatch input id: meta env: - PAYLOAD_VERSION: ${{ github.event.client_payload.version }} + INPUT_VERSION: ${{ github.event.inputs.version }} run: | set -euo pipefail - if [ -z "${PAYLOAD_VERSION}" ]; then - echo "No version in client_payload, skip post-release." + if [ -z "${INPUT_VERSION}" ]; then + echo "No version in workflow_dispatch input, skip post-release." echo "skip=true" >> "$GITHUB_OUTPUT" exit 0 fi - echo "Using version from payload: ${PAYLOAD_VERSION}" - echo "version=${PAYLOAD_VERSION}" >> "$GITHUB_OUTPUT" + echo "Using version from input: ${INPUT_VERSION}" + echo "version=${INPUT_VERSION}" >> "$GITHUB_OUTPUT" echo "skip=false" >> "$GITHUB_OUTPUT" - name: Checkout main From b2a0e10b7a4f9ea34e6ddb8d093ebb894f4e6e21 Mon Sep 17 00:00:00 2001 From: fangsmile <892739385@qq.com> Date: Tue, 12 May 2026 09:53:40 +0800 Subject: [PATCH 2/2] chore: update workflow --- .github/workflows/post-release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index a51fd1bca..511c53b2a 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -1,6 +1,8 @@ name: Post release after develop synced on: + repository_dispatch: + types: [develop-synced] workflow_dispatch: inputs: version: @@ -16,19 +18,21 @@ jobs: contents: write steps: - - name: Read version from workflow_dispatch input + - name: Read version from event payload or workflow_dispatch input id: meta env: + PAYLOAD_VERSION: ${{ github.event.client_payload.version }} INPUT_VERSION: ${{ github.event.inputs.version }} run: | set -euo pipefail - if [ -z "${INPUT_VERSION}" ]; then - echo "No version in workflow_dispatch input, skip post-release." + VERSION="${PAYLOAD_VERSION:-${INPUT_VERSION:-}}" + if [ -z "${VERSION}" ]; then + echo "No version in repository_dispatch payload or workflow_dispatch input, skip post-release." echo "skip=true" >> "$GITHUB_OUTPUT" exit 0 fi - echo "Using version from input: ${INPUT_VERSION}" - echo "version=${INPUT_VERSION}" >> "$GITHUB_OUTPUT" + echo "Using version: ${VERSION}" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" echo "skip=false" >> "$GITHUB_OUTPUT" - name: Checkout main