Merge branch 'develop' into release/2.13.0-rc #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare release branch | |
on: | |
push: | |
branches: | |
- 'release/*.*.*' | |
- 'support/*.*.*' | |
jobs: | |
extract_version: | |
if: github.event.created | |
name: Extract Version | |
runs-on: macos-15 | |
outputs: | |
version: ${{ steps.extract.outputs.version }} | |
steps: | |
- name: Extract version from branch name | |
id: extract | |
run: | | |
BRANCH_NAME="${{ github.ref_name }}" | |
echo "BRANCH_NAME: $BRANCH_NAME" | |
VERSION="${BRANCH_NAME#release/}" | |
VERSION="${VERSION#support/}" | |
echo "VERSION: $VERSION" | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
bump_version: | |
name: Bump Version | |
runs-on: macos-15 | |
needs: extract_version | |
outputs: | |
version2: ${{ steps.bump.outputs.version2 }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Bump version | |
run: ./.github/git-release-branch-create.sh "${{ needs.extract_version.outputs.version }}" | |
- name: Ouput version | |
id: bump | |
run: | | |
echo "version2=${{ needs.extract_version.outputs.version }}" >> $GITHUB_OUTPUT | |
check_sdk_version: | |
name: Check SDK Version | |
runs-on: macos-15 | |
needs: bump_version | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Pull latest changes | |
run: git pull | |
- name: Check if sdkVersion matches VERSION | |
run: | | |
SDK_VERSION=$(sed -n 's/^.*sdkVersion = "\(.*\)"/\1/p' SDKVersionProvider/SDKVersionProvider.swift) | |
if [ "$SDK_VERSION" != "${{ needs.bump_version.outputs.version2 }}" ]; then | |
echo "SDK version ($SDK_VERSION) does not match the branch version (${{ needs.bump_version.outputs.version2 }})." | |
exit 1 | |
fi | |
shell: bash | |
create_pull_request: | |
name: Create Pull Request | |
runs-on: macos-15 | |
needs: check_sdk_version | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Create Pull Request | |
run: | | |
gh pr create \ | |
--base master \ | |
--head ${{ github.ref_name }} \ | |
--title "${{ github.ref_name }}" \ | |
--body "Updates the release version to ${{ github.ref_name }}" | |
PR_URL=$(gh pr view --json url --jq '.url') | |
echo "PR_URL=$PR_URL" >> $GITHUB_ENV | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |