Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down
Loading