Skip to content

Commit

Permalink
ci: further improve release workflow (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfred authored Oct 8, 2024
1 parent 11cd2fb commit 1a566c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/finish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -118,4 +118,4 @@ jobs:
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event.inputs.dryRun == 'false' }}
if: ${{ github.event.inputs.dryRun == 'false' }}

0 comments on commit 1a566c0

Please sign in to comment.