Skip to content

Commit

Permalink
Use unique names for each Python version
Browse files Browse the repository at this point in the history
  • Loading branch information
FanwangM committed Oct 30, 2024
1 parent 500b704 commit 5f6ef92
Showing 1 changed file with 39 additions and 10 deletions.
49 changes: 39 additions & 10 deletions .github/workflows/pypi_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
name: dist-${{ matrix.os }}-py${{ matrix.python-version }}
path: dist/

publish-to-pypi:
Expand All @@ -79,11 +79,20 @@ jobs:
id-token: write

steps:
- name: Download all the dists
# - name: Download all the dists
# uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: dist/
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
path: artifacts

- name: Move artifacts to dist
run: |
mkdir -p dist/
find artifacts -name '*.tar.gz' -o -name '*.whl' -exec mv {} dist/ \;
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
env:
Expand All @@ -100,12 +109,22 @@ jobs:
contents: write
id-token: write


steps:
- name: Download all the dists
# - name: Download all the dists
# uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: dist/
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
path: artifacts

- name: Move artifacts to dist
run: |
mkdir -p dist/
find artifacts -name '*.tar.gz' -o -name '*.whl' -exec mv {} dist/ \;
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
Expand Down Expand Up @@ -142,12 +161,22 @@ jobs:
permissions:
id-token: write


steps:
- name: Download all the dists
# - name: Download all the dists
# uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: dist/
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
path: artifacts

- name: Move artifacts to dist
run: |
mkdir -p dist/
find artifacts -name '*.tar.gz' -o -name '*.whl' -exec mv {} dist/ \;
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit 5f6ef92

Please sign in to comment.