Skip to content

Commit

Permalink
ci(release): allow for manual release
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijas committed Sep 25, 2023
1 parent effa71c commit 4aa7a95
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ jobs:
- name: Build package
run: poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PUBLIC_PYPI_API_TOKEN }}
run: |
# Use the build number to create a local 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}"
poetry version "${NEW_VERSION}"
fi
poetry build
poetry publish --username __token__ --password ${{ secrets.PUBLIC_PYPI_API_TOKEN }}

0 comments on commit 4aa7a95

Please sign in to comment.