Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfred committed Nov 19, 2024
1 parent a17022c commit 49bafd1
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
'name: Release
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -40,6 +40,10 @@ jobs:
fetch-depth: 0
ref: v${{ github.event.inputs.javaVersion }}

- name: Delete release branch (if exists)
continue-on-error: true
run: git push -d origin $RELEASE_BRANCH_NAME

- uses: actions/setup-java@v3
with:
java-version: '17'
Expand Down Expand Up @@ -122,21 +126,22 @@ jobs:
git commit -am "build: move back to version $NEW_VERSION"
git push origin $RELEASE_BRANCH_NAME
- name: Delete version branch (if exists)
continue-on-error: true
run: |
java_version=${{ github.event.inputs.javaVersion }}
version="${java_version%.*}.x"
git push -d origin $version
- name: Update release branch
working-directory: ./timefold-quickstarts
shell: bash
run: |
java_version=${{ github.event.inputs.javaVersion }}
version="${java_version%.*}.x"
echo $version
exists="$(git branch -a | grep -w $version || true)"
echo "branch $exists"
git config user.name "Timefold Release Bot"
git config user.email "[email protected]"
if [ -n "$exists" ]; then
git push -d origin $version
fi
git checkout $RELEASE_BRANCH_NAME
git branch -m $RELEASE_BRANCH_NAME $version
git push origin -u $version
git push -d origin $RELEASE_BRANCH_NAME
git push -d origin $RELEASE_BRANCH_NAME'

0 comments on commit 49bafd1

Please sign in to comment.