Skip to content

ci: fix testpypi publish #6

ci: fix testpypi publish

ci: fix testpypi publish #6

Workflow file for this run

name: publish to Test pypi
on:
push:
branches:
- main
jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pycolint
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/
verbose: true