From 88a20a8b36ded8137c5bedb6851c3974926e68d0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 22 Jun 2026 22:17:45 +0200 Subject: workflows/ci: the PyPI workflow cannot be reusable --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 830e67a..4a02b2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,13 +37,42 @@ jobs: # Build a Python package and upload to PyPI. publish: - name: Publish to PyYPI + # This workflow cannot be reusable for some reason: + # https://github.com/pypa/gh-action-pypi-publish/issues/166 needs: - lint - basic - boost_toolsets - example_toolsets - uses: ./.github/workflows/publish.yml + runs-on: ubuntu-latest + name: Publish to PyPI + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Verify package can be installed + run: pip install -q . + - name: Install package builder + run: pip install -q --upgrade build + - name: Build package + run: python -m build + - name: Publish as artifact + uses: actions/upload-artifact@v7 + with: + name: dist + path: dist + if-no-files-found: error + - name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags/') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: '${{ secrets.PYPI_API_TOKEN }}' aur: name: Publish to AUR -- cgit v1.3