2023-08-27 16:19:33 +00:00
|
|
|
---
|
|
|
|
name: Publish test version to TestPyPI
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
environment: testpypi
|
|
|
|
permissions:
|
|
|
|
id-token: write
|
|
|
|
steps:
|
2023-09-05 07:10:11 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-27 16:19:33 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Python
|
2023-12-07 07:42:43 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-08-27 16:19:33 +00:00
|
|
|
with:
|
|
|
|
python-version: '${{ env.DEFAULT_PYTHON }}'
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
# Cheat
|
|
|
|
sed -i '/\[tool.setuptools_scm\]/ s/$/\nlocal_scheme = "no-local-version"/' pyproject.toml
|
|
|
|
pip install build
|
|
|
|
python3 -m build
|
|
|
|
- name: Publish package distributions to PyPI
|
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
with:
|
|
|
|
repository-url: https://test.pypi.org/legacy/
|