Skip to content

Commit

Permalink
Fix handling of Python versions (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Jun 25, 2024
1 parent b9f555b commit 36e687a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions python/pre-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ inputs:
description: Whether this is a dry run
required: true

outputs:
version:
description: The output version to use
value: ${{ steps.version.outputs.version }}

runs:
using: composite
steps:
Expand Down Expand Up @@ -46,3 +51,12 @@ runs:
with:
version: ${{ inputs.version }}
push_tag: ${{ env.PUSH_CHANGES }}
- name: Handle version
shell: bash
id: version
run: |
if [ "${{ inputs.dry_run}}" == 'true' ]; then
echo "version=${{ github.ref }}" >> $GITHUB_OUTPUT
else
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
fi
7 changes: 6 additions & 1 deletion python/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ runs:
git pull origin ${GITHUB_REF}
- name: Set following version
uses: mongodb-labs/drivers-github-tools/bump-version@v2
if: inputs.dry_run == 'false'
with:
version: ${{ inputs.following_version }}
version_bump_script: ${{ inputs.version_bump_script }}
working_directory: ${{ inputs.working_directory }}
push_commit: ${{ steps.publish-script.output.push_changes }}
- name: Skip Setting following version
shell: bash
if: inputs.dry_run == 'true'
run: |
echo "Dry run, not setting the following version: ${{ inputs.following_version }}" >> $GITHUB_STEP_SUMMARY

0 comments on commit 36e687a

Please sign in to comment.