Add workflow for publishing to pypi-test #1
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: Upload Python Package | |
on: | |
push | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
# This permission is required for trusted publishing. | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Poetry | |
uses: snok/[email protected] | |
with: | |
virtualenvs-create: false | |
- name: Build | |
run: | | |
poetry build | |
- name: Mint token | |
id: mint | |
uses: tschm/[email protected] | |
- name: Publish the package with poetry | |
run: | | |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}' -r https://test.pypi.org/legacy/ |