Skip to content

Commit

Permalink
Cut branches for both sdk and swazzler before updating master (#1240)
Browse files Browse the repository at this point in the history
## Goal

Changing the order so the master properties file updates don't make the swazzler branch cutting fail
  • Loading branch information
bidetofevil authored Aug 13, 2024
1 parent f588c46 commit 1e7f96d
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 23 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/pre-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ jobs:
secrets: inherit
with:
version_to_release: ${{ github.event.inputs.version_to_release }}

update-main-versions:
name: Update Main Versions
uses: ./.github/workflows/update-main-versions.yml
secrets: inherit
with:
next_version: ${{ github.event.inputs.next_version }}

release-candidate:
name: Create Release Candidate
name: Build Release Candidates
needs: release-branch
uses: ./.github/workflows/build-rc-workflow.yml
secrets: inherit
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/rc-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ on:
version_to_release:
required: true
type: string
next_version:
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
next_version:
description: 'Next version. Specify <major.minor>, e.g. 6.4 (Do NOT include -SNAPSHOT, will be added automatically)'
required: true

permissions:
contents: write
Expand Down Expand Up @@ -48,14 +42,6 @@ jobs:
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:
Expand All @@ -73,11 +59,3 @@ jobs:
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
55 changes: 55 additions & 0 deletions .github/workflows/update-main-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Pre-Release - Update Main Versions

on:
workflow_call:
inputs:
next_version:
required: true
type: string
workflow_dispatch:
inputs:
next_version:
description: 'Next version. Specify <major.minor>, e.g. 6.4 (Do NOT include -SNAPSHOT, will be added automatically)'
required: true

permissions:
contents: write

jobs:
update-main-versions:
name: Update Main Versions
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'
- name: Checkout SDK
uses: actions/checkout@v4
with:
ref: master

- 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.GH_EMBRACE_SWAZZLER3_TOKEN }}

- 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

0 comments on commit 1e7f96d

Please sign in to comment.