Skip to content

Commit

Permalink
Add support for non top-level python packages (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Jun 23, 2024
1 parent fcaaff9 commit 64b3468
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bump-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ inputs:
push_commit:
description: Whether to push the commit
default: "true"
working_directory:
description: The working directory for the version bump
default: "."
artifactory_image:
description: "Image to use for artifactory"
default: release-tools-container-registry-local/garasign-git
Expand All @@ -23,6 +26,7 @@ runs:
- name: Set new version
if: ${{ inputs.version_bump_script != '' }}
shell: bash -eux {0}
working-directory: ${{ inputs.working_directory }}
run: |
${{ inputs.version_bump_script }} ${{ inputs.version }}
- name: Get the commit message
Expand Down
5 changes: 5 additions & 0 deletions python/pre-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
version_bump_script:
description: The version bump script
default: hatch version
working_directory:
description: The working directory for the action
default: "."
dry_run:
description: Whether this is a dry run
required: true
Expand All @@ -19,6 +22,7 @@ runs:
python-version: '3.11'
- name: Install hatch
shell: bash
working-directory: ${{ inputs.working_directory }}
run: pipx install hatch
- name: Check if we should push changes
shell: bash
Expand All @@ -35,6 +39,7 @@ runs:
with:
version: ${{ inputs.version }}
version_bump_script: ${{ inputs.version_bump_script }}
working_directory: ${{ inputs.working_directory }}
push_commit: ${{ env.PUSH_CHANGES }}
- name: Tag version
uses: mongodb-labs/drivers-github-tools/tag-version@v2
Expand Down
4 changes: 4 additions & 0 deletions python/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
silk_asset_group:
description: The Silk Asset Group for the Project
required: true
working_directory:
description: The working directory for the action
default: "."
token:
description: The GitHub access token
dry_run:
Expand Down Expand Up @@ -76,4 +79,5 @@ runs:
with:
version: ${{ inputs.following_version }}
version_bump_script: ${{ inputs.version_bump_script }}
working_directory: ${{ inputs.working_directory }}
push_changes: ${{ steps.publish-script.output.push_changes }}
2 changes: 1 addition & 1 deletion python/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eux
if [ "$DRY_RUN" == "false" ]; then
PUSH_CHANGES=true
echo "Creating draft release with attached files"
TITLE="PyMongo ${VERSION}"
TITLE="${PRODUCT_NAME} ${VERSION}"
gh release create ${VERSION} --draft --verify-tag --title "${TITLE}" --notes "Community notes: <link>"
gh release upload ${VERSION} $RELEASE_ASSETS/*.*
JSON="url,tagName,assets,author,createdAt"
Expand Down

0 comments on commit 64b3468

Please sign in to comment.