-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into nelson/fix-workflows
- Loading branch information
Showing
3 changed files
with
110 additions
and
116 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Pre-Release - Create Release Branches | ||
|
||
on: | ||
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 | ||
next_version: | ||
description: 'Next version. Specify <major.minor>, e.g. 6.4 (Do NOT include -SNAPSHOT, will be added automatically)' | ||
required: true | ||
|
||
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 'embrace-ci@users.noreply.github.com' | ||
git config --global url."https://${{ secrets.CD_GITHUB_USER }}:${{ secrets.CD_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com" | ||
- name: Checkout SDK | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: master | ||
token: ${{ secrets.CD_GITHUB_TOKEN }} | ||
|
||
- 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: Set next SDK version | ||
run: | | ||
git checkout master | ||
sed -i -r "s#version = ([^\']+)#version = ${{ github.event.inputs.next_version }}.0-SNAPSHOT#" gradle.properties | ||
git add gradle.properties | ||
git commit -m "CI/CD: set next version: ${{ github.event.inputs.next_version }}.0-SNAPSHOT" | ||
git push | ||
- name: Checkout Swazzler | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: embrace-io/embrace-swazzler3 | ||
ref: master | ||
token: ${{ secrets.CD_GITHUB_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 }} | ||
- name: Set Next Swazzler Version | ||
run: | | ||
git checkout master | ||
sed -i -r "s#version = ([^\']+)#version = ${{ github.event.inputs.next_version }}.0-SNAPSHOT#" gradle.properties | ||
git add gradle.properties | ||
git commit -m "CI/CD: set next version: ${{ github.event.inputs.next_version }}.0-SNAPSHOT" | ||
git push |