Create Release Branch #3
Workflow file for this run
This file contains hidden or 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
| # .github/workflows/create-release-branch.yml | |
| name: Create Release Branch | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| base-ref: | |
| description: "Base ref (commit/branch) to create the release from" | |
| required: true | |
| type: string | |
| default: "main" | |
| version: | |
| description: "Release version number (e.g. 1.8.0)" | |
| required: true | |
| type: string | |
| ios-bump: | |
| description: "iOS SDK version bump" | |
| required: false | |
| type: choice | |
| options: | |
| - "none" | |
| - "patch" | |
| - "minor" | |
| - "major" | |
| default: "none" | |
| android-bump: | |
| description: "Android SDK version bump" | |
| required: false | |
| type: choice | |
| options: | |
| - "none" | |
| - "patch" | |
| - "minor" | |
| - "major" | |
| default: "none" | |
| jobs: | |
| create-branch: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.base-ref }} | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup-release-tools | |
| - name: Create release branch | |
| env: | |
| RELEASE_VERSION: ${{ inputs.version }} | |
| BASE_REF: ${{ inputs.base-ref }} | |
| IOS_BUMP: ${{ inputs.ios-bump }} | |
| ANDROID_BUMP: ${{ inputs.android-bump }} | |
| run: | | |
| xmtp-release create-release-branch \ | |
| --version "$RELEASE_VERSION" \ | |
| --base "$BASE_REF" \ | |
| --ios "$IOS_BUMP" \ | |
| --android "$ANDROID_BUMP" | |
| git push -u origin "release/${RELEASE_VERSION}" | |
| - name: Create pull request | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASE_VERSION: ${{ inputs.version }} | |
| run: | | |
| BRANCH="release/${RELEASE_VERSION}" | |
| gh pr create \ | |
| --base main \ | |
| --head "$BRANCH" \ | |
| --title "Release ${RELEASE_VERSION}" \ | |
| --body "$(cat <<EOF | |
| ## Release ${RELEASE_VERSION} | |
| This PR was created by the Create Release Branch workflow. | |
| ### Checklist | |
| - [ ] Release notes reviewed and finalized | |
| - [ ] All SDK versions bumped | |
| - [ ] RC published and validated | |
| - [ ] Final release published via Publish Release workflow | |
| > **Note:** This PR will be merged automatically by the Publish Release workflow upon final release. | |
| EOF | |
| )" |