Skip to content

Commit 4a48534

Browse files
authored
Merge pull request #4509 from VisActor/feat/change-post-release-dispatch
feat: change post-release dispatch
2 parents 8640efb + 97366f5 commit 4a48534

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/post-release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Post release after develop synced
22

33
on:
4-
repository_dispatch:
5-
types: [develop-synced]
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version, e.g. 1.2.3'
8+
required: true
9+
type: string
610

711
jobs:
812
post_release:
@@ -12,19 +16,19 @@ jobs:
1216
contents: write
1317

1418
steps:
15-
- name: Read version from repository_dispatch payload
19+
- name: Read version from workflow_dispatch input
1620
id: meta
1721
env:
18-
PAYLOAD_VERSION: ${{ github.event.client_payload.version }}
22+
INPUT_VERSION: ${{ github.event.inputs.version }}
1923
run: |
2024
set -euo pipefail
21-
if [ -z "${PAYLOAD_VERSION}" ]; then
22-
echo "No version in client_payload, skip post-release."
25+
if [ -z "${INPUT_VERSION}" ]; then
26+
echo "No version in workflow_dispatch input, skip post-release."
2327
echo "skip=true" >> "$GITHUB_OUTPUT"
2428
exit 0
2529
fi
26-
echo "Using version from payload: ${PAYLOAD_VERSION}"
27-
echo "version=${PAYLOAD_VERSION}" >> "$GITHUB_OUTPUT"
30+
echo "Using version from input: ${INPUT_VERSION}"
31+
echo "version=${INPUT_VERSION}" >> "$GITHUB_OUTPUT"
2832
echo "skip=false" >> "$GITHUB_OUTPUT"
2933
3034
- name: Checkout main

0 commit comments

Comments
 (0)