From 1a566c05081c17cc32f6f14448e70f053f0ef4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederico=20Gon=C3=A7alves?= Date: Tue, 8 Oct 2024 07:56:23 -0300 Subject: [PATCH] ci: further improve release workflow (#1139) --- .github/workflows/finish_release.yml | 10 ++++++++++ .github/workflows/release.yml | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/finish_release.yml b/.github/workflows/finish_release.yml index 33e8bc7665..bce8b02eb5 100644 --- a/.github/workflows/finish_release.yml +++ b/.github/workflows/finish_release.yml @@ -17,6 +17,16 @@ jobs: ref: main fetch-depth: 0 # Otherwise merge will fail on account of not having history. + - name: Put back the 999-SNAPSHOT version on the release branch + run: | + git config user.name "Timefold Release Bot" + git config user.email "release@timefold.ai" + git checkout $RELEASE_BRANCH_NAME + mvn -Dfull versions:set -DnewVersion=999-SNAPSHOT + sed -i "s/^timefold_solver_python_version.*=.*/timefold_solver_python_version = '999-dev0'/" setup.py + git commit -am "build: move back to 999-SNAPSHOT" + git push origin $RELEASE_BRANCH_NAME + - name: Update release branch shell: bash run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c693bdf071..91e2bd96a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: fetch-depth: 0 ref: ${{ github.event.inputs.sourceBranch }} - - name: Init release branch + - name: Delete release branch (if exists) continue-on-error: true run: git push -d origin $RELEASE_BRANCH_NAME @@ -78,7 +78,7 @@ jobs: - name: Install Pip and build run: | python -m pip install --upgrade pip - pip install build + pip install build # We skip tests in dry run, to make the process faster. # Technically, this goes against the main reason for doing a dry run; to eliminate potential problems. @@ -118,4 +118,4 @@ jobs: - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - if: ${{ github.event.inputs.dryRun == 'false' }} \ No newline at end of file + if: ${{ github.event.inputs.dryRun == 'false' }}