Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/test-pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test Upload Python Package to TestPyPI

on:
workflow_dispatch:

jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install --upgrade build
- name: Build package
run: pyproject-build --sdist
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
overwrite: true
if-no-files-found: error
retention-days: 1

publish:
name: Upload release to TestPyPI
needs: build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pyprecice
permissions:
id-token: write
steps:
- name: Download package
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/