Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python Package | |
on: | |
release: | |
types: [created] | |
permissions: | |
actions: write | |
jobs: | |
build-n-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
set -e | |
python -m pip install --upgrade pip | |
curl -sSL https://install.python-poetry.org | python3 - | |
shell: bash | |
# - name: Version bump | |
# run: | | |
# set -e | |
# poetry version ${{ github.event.release.tag_name }} | |
# git add ./pyproject.toml | |
# git config --global user.name "Release Bot" | |
# git config --global user.email "[email protected]" | |
# git commit -m "Change version to ${{ github.event.release.tag_name }}" --allow-empty | |
# git push origin HEAD:main | |
# shell: bash | |
- name: Publish package to PyPI | |
run: | | |
set -e | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
poetry publish -n --build | |
shell: bash | |
# poetry config repositories.publish ${{ inputs.PUBLISH_REGISTRY }} | |
# poetry publish -p ${{ secrets.PYPI_API_TOKEN }} -u ${{ inputs.PUBLISH_REGISTRY_USERNAME }} -r publish --build |