Skip to content

CI deps

CI deps #3

name: Publish to TestPyPI
on:
push:
branches:
- master
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 from 2026-01-09.
with:
persist-credentials: false
- uses: ironsh/iron-proxy-action@fa1fd82ec32396d044deba7040a6db576bec927a # v0.1.4 from 2026-04-28.
with:
egress-rules: .github/egress-build-rules.yaml
- name: Fetch tags
run: git fetch --tags origin
- name: Fetch old commits
run: git fetch --shallow-since=$(git show -s --format='%as' $(git rev-list --tags --max-count=1)) origin
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 from 2026-01-21.
with:
cache: pip
python-version: '3.x'
- name: Install pypa/build
run: python3 -m pip install --user build packaging
- name: Prepublish BS
run: python3 testpypi_prepublish.py
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 from 2026-04-10.
with:
name: python-package-distributions
path: dist/
- uses: ironsh/iron-proxy-action/summary@fa1fd82ec32396d044deba7040a6db576bec927a # v0.1.4 from 2026-04-28.
if: always()
publish-to-testpypi:
name: Publish Python distribution to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pathspec
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 from 2026-03-11.
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 from 2026-04-07.
with:
repository-url: https://test.pypi.org/legacy/
print-hash: true
verbose: true