Skip to content

Commit

Permalink
Add manual workflow to publish to TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiX committed Aug 27, 2023
1 parent c04e49b commit 6f721b0
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Publish test version to TestPyPI

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
environment: testpypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
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/

0 comments on commit 6f721b0

Please sign in to comment.