Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/scripts/validate-release-version
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ case "$PLATFORM_INPUT" in
iOS|ios|swift|Swift)
PLATFORM="ios"
DISPLAY_PLATFORM="iOS"
RELEASE_TITLE_PREFIX="Swift"
TAG_PREFIX=""
PUBLISH_WORKFLOW="swift-publish.yml"

Expand All @@ -75,6 +76,7 @@ case "$PLATFORM_INPUT" in
Android|android)
PLATFORM="android"
DISPLAY_PLATFORM="Android"
RELEASE_TITLE_PREFIX="Android"
TAG_PREFIX="android/"
PUBLISH_WORKFLOW="android-publish.yml"

Expand All @@ -99,6 +101,7 @@ if [ -n "$EXPECTED_VERSION" ] && [ "$EXPECTED_VERSION" != "$VERSION" ]; then
fi

TAG="${TAG_PREFIX}${VERSION}"
RELEASE_TITLE="[${RELEASE_TITLE_PREFIX}] ${VERSION}"

if [ -n "$EXPECTED_TAG" ] && [ "$EXPECTED_TAG" != "$TAG" ]; then
echo "::error::Git tag '$EXPECTED_TAG' does not match ${DISPLAY_PLATFORM} SDK version '$VERSION'. Expected tag '$TAG'." >&2
Expand All @@ -116,6 +119,7 @@ fi
echo "display_platform=$DISPLAY_PLATFORM"
echo "version=$VERSION"
echo "tag=$TAG"
echo "release_title=$RELEASE_TITLE"
echo "publish_workflow=$PUBLISH_WORKFLOW"
echo "prerelease=$PRERELEASE"
}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
DISPLAY_PLATFORM: ${{ steps.release.outputs.display_platform }}
VERSION: ${{ steps.release.outputs.version }}
TAG: ${{ steps.release.outputs.tag }}
RELEASE_TITLE: ${{ steps.release.outputs.release_title }}
PRERELEASE: ${{ steps.release.outputs.prerelease }}
PUBLISH_WORKFLOW: ${{ steps.release.outputs.publish_workflow }}
DRAFT: ${{ inputs.draft }}
Expand All @@ -94,6 +95,7 @@ jobs:
echo " Platform: ${DISPLAY_PLATFORM}"
echo " Version: ${VERSION}"
echo " Tag: ${TAG}"
echo " Title: ${RELEASE_TITLE}"
echo " Prerelease: ${PRERELEASE}"
echo " Publish workflow: ${PUBLISH_WORKFLOW}"
echo " Dry run: ${DRY_RUN}"
Expand All @@ -108,13 +110,14 @@ jobs:
if: ${{ !inputs.dry-run }}
env:
TAG: ${{ steps.release.outputs.tag }}
RELEASE_TITLE: ${{ steps.release.outputs.release_title }}
PRERELEASE: ${{ steps.release.outputs.prerelease }}
DRAFT: ${{ inputs.draft }}
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail

args=("$TAG" --target "$GITHUB_SHA" --title "$TAG" --generate-notes)
args=("$TAG" --target "$GITHUB_SHA" --title "$RELEASE_TITLE" --generate-notes)
if [ "$DRAFT" = "true" ]; then
args+=(--draft)
fi
Expand Down Expand Up @@ -143,6 +146,7 @@ jobs:
DISPLAY_PLATFORM: ${{ steps.release.outputs.display_platform }}
VERSION: ${{ steps.release.outputs.version }}
TAG: ${{ steps.release.outputs.tag }}
RELEASE_TITLE: ${{ steps.release.outputs.release_title }}
PUBLISH_WORKFLOW: ${{ steps.release.outputs.publish_workflow }}
run: |
cat >> "$GITHUB_STEP_SUMMARY" <<SUMMARY
Expand All @@ -153,5 +157,6 @@ jobs:
- Platform: ${DISPLAY_PLATFORM}
- Version: ${VERSION}
- Tag: \`${TAG}\`
- Title: ${RELEASE_TITLE}
- Publish workflow: \`${PUBLISH_WORKFLOW}\`
SUMMARY
Loading