Publish to PyPi and create GitHub Release #5
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 to PyPi and create GitHub Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: publish | |
runs-on: ubuntu-latest | |
environment: publish | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: python -m build | |
- name: Publish PyPi package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# - name: Publish GitHub release | |
# uses: ncipollo/release-action@v1 | |
# with: | |
# artifacts: "dist/*.tar.gz" |