no auto versions #12
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: release | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
pypi-publish: | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
environment: release | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
contents: read | |
steps: | |
# retrieve your distributions here | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: false | |
- name: build python | |
run: | | |
poetry build | |
- name: Mint pypi token | |
id: mint | |
uses: tschm/token-mint-action@v1.0.3 | |
- name: Publish the package with poetry | |
run: | | |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}' |