Skip to content

point test.pypi.org to github #2

point test.pypi.org to github

point test.pypi.org to github #2

name: Publish to TestPyPI
on:
push:
tags:
- "v*" # Any tag starting with v, like v0.1.0
jobs:
build-and-publish:
name: Build and publish to TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write # REQUIRED for Trusted Publishing
contents: read
environment:
name: testpypi
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Publish to TestPyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/