-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release | ||
'name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
@@ -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' | ||
|
@@ -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' |