name: Publish Pre-Releases to PyPI on: push: tags: # Matches Semantic Versioning pre-release tags (e.g., 1.2.3a0, 1.2.3.a0, 1.2.3rc2, 1.2.3.rc2) # Format: MAJOR.MINOR.PATCH[.|]a|b|rcN - "[0-9]*.[0-9]*.[0-9]*a[0-9]*" - "[0-9]*.[0-9]*.[0-9]*.a[0-9]*" - "[0-9]*.[0-9]*.[0-9]*b[0-9]*" - "[0-9]*.[0-9]*.[0-9]*.b[0-9]*" - "[0-9]*.[0-9]*.[0-9]*rc[0-9]*" - "[0-9]*.[0-9]*.[0-9]*.rc[0-9]*" workflow_dispatch: pull_request: branches: ["main", "release/latest", "develop"] paths: - ".github/workflows/build-package.yml" - ".github/workflows/publish-pre-release.yml" permissions: contents: read jobs: build-pkg: uses: ./.github/workflows/build-package.yml publish-pre-release: name: Publish Pre-release Package needs: build-pkg runs-on: ubuntu-latest environment: name: test url: https://pypi.org/project/rfdetr/ timeout-minutes: 10 permissions: id-token: write # Required for PyPI publishing steps: - name: 📥 Download distribution artifacts uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: name: dist path: dist/ - name: Display distribution files run: ls -lh dist/ - name: 🚀 Publish to PyPi if: github.event_name != 'pull_request' uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 with: attestations: true