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 spapros to PyPI | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 2 | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.9" | |
- name: Upgrade pip | |
run: | | |
pip install pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
poetry --version | |
- name: Build package | |
run: | | |
poetry build --ansi | |
- name: Publish package on PyPI | |
uses: pypa/[email protected] | |
with: | |
# TODO COOKIETEMPLE: Configure your PyPI Token to enable automatic deployment to PyPi on releases | |
# https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish the release notes | |
uses: release-drafter/[email protected] | |
with: | |
publish: ${{ steps.check-version.outputs.tag != '' }} | |
tag: ${{ steps.check-version.outputs.tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |