release #3
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
# This workflow will publish a python package on pypi, when a release is created | |
name: release | |
on: | |
release: | |
types: [published] | |
permissions: | |
# This permission is required for trusted publishing. | |
id-token: write | |
contents: read | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry poetry-dynamic-versioning | |
# - name: Setup TESTPYPI repo | |
# run: | | |
# poetry config repositories.testpypi https://test.pypi.org/legacy/ | |
- name: Build package | |
run: | | |
poetry build | |
################################ | |
# TEMPORARY TEST PYPI STEPS # | |
################################ | |
# - name: Mint token for Testpypi | |
# id: mint | |
# uses: tschm/token-mint-action@v1.0.2 | |
# with: | |
# audience: testpypi | |
# - name: Publish the package to Testpypi | |
# run: | | |
# poetry publish -r testpypi -u __token__ -p '${{ steps.mint.outputs.api-token }}' | |
- name: Publish package distributions to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
##################################### | |
# DISABLE TEST STEPS AND UNCOMMENT # | |
# THE FOLLOWING STEPS WHEN READY # | |
##################################### | |
# - name: Mint token for Pypi | |
# id: mint | |
# uses: tschm/token-mint-action@v1.0.2 | |
# - name: Publish the package to Pypi | |
# run: | | |
# poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}' |