Create Release Branches #3
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: Create Release Branches | |
on: | |
workflow_call: | |
inputs: | |
version_to_release: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
version_to_release: | |
description: 'Version to release. Specify <major.minor> only, without the patch number, e.g. 6.3. A new branch called "release/<version>" will be created where the release-specific changes will be committed.' | |
required: true | |
permissions: | |
contents: write | |
jobs: | |
release-branch: | |
name: Create Release Branches | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure git | |
run: | | |
git config --global user.name 'embrace-ci[bot]' | |
git config --global user.email '[email protected]' | |
- name: Checkout SDK | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Create SDK Release Branch "release/${{ github.event.inputs.version_to_release }}" | |
run: | | |
git checkout -b release/${{ github.event.inputs.version_to_release }} | |
- name: Set version in gradle.properties | |
run: | | |
sed -i -r "s#version = ([^\']+)#version = ${{ github.event.inputs.version_to_release }}.0#" gradle.properties | |
git add gradle.properties | |
git commit -m "CI/CD: change version to be released: ${{ github.event.inputs.version_to_release }}.0" | |
git push --set-upstream origin release/${{ github.event.inputs.version_to_release }} | |
- name: Checkout Swazzler | |
uses: actions/checkout@v4 | |
with: | |
repository: embrace-io/embrace-swazzler3 | |
ref: master | |
token: ${{ secrets.GH_EMBRACE_SWAZZLER3_TOKEN }} | |
- name: Create Swazzler Release Branch "release/${{ github.event.inputs.version_to_release }}" | |
run: | | |
git checkout -b release/${{ github.event.inputs.version_to_release }} | |
- name: Set version in gradle.properties | |
run: | | |
sed -i -r "s#version = ([^\']+)#version = ${{ github.event.inputs.version_to_release }}.0#" gradle.properties | |
git add gradle.properties | |
git commit -m "CI/CD: change version to be released: ${{ github.event.inputs.version_to_release }}.0" | |
git push --set-upstream origin release/${{ github.event.inputs.version_to_release }} |