Skip to content

Commit

Permalink
fix(packaging): use post-release versions for PyPI compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijas authored Sep 25, 2023
1 parent f6ef8b3 commit c505c30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ jobs:
run: poetry build
- name: Publish package
run: |
# Use the build number to create a local version identifier
# Use the build number to create a pre-release or post-release version identifier
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
BUILD_NUMBER=${{ github.event.inputs.build_number }}
POETRY_VERSION=$(poetry version | awk '{print $2}')
NEW_VERSION="${POETRY_VERSION}+build${BUILD_NUMBER}"
NEW_VERSION="${POETRY_VERSION}.post${BUILD_NUMBER}"
poetry version "${NEW_VERSION}"
fi
poetry build
poetry publish --username __token__ --password ${{ secrets.PUBLIC_PYPI_API_TOKEN }}

0 comments on commit c505c30

Please sign in to comment.