|
1 | 1 | name: "Publish Python distribution to PyPI" |
2 | 2 | # Uses: |
3 | | -# https://github.com/actions/setup-python : 0b93645e9fea7318ecaed2b359559ac225c90a2b |
| 3 | +# https://github.com/actions/setup-python : a26af69be951a213d495a4c3e4e4022e16d87065 |
4 | 4 | # https://github.com/actions/checkout : 11bd71901bbe5b1630ceea73d27597364c9af683 |
5 | | -# https://github.com/actions/download-artifact : fa0a91b85d4f404e444e00e005971372dc801d16 |
6 | | -# https://github.com/actions/upload-artifact : 6f51ac03b9356f520e9adb1b1b7802705f340c2b |
| 5 | +# https://github.com/actions/download-artifact : d3f86a106a0bac45b974a628896c90dbdf5c8093 |
| 6 | +# https://github.com/actions/upload-artifact : ea165f8d65b6e75b540449e92b4886f43607fa02 |
7 | 7 | # https://github.com/actions/pypa/gh-action-pypi-publish : 76f52bc884231f62b9a034ebfe128415bbaabdfc |
8 | 8 |
|
9 | 9 | on: |
|
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | build: |
15 | | - name: "Build distribution" |
| 15 | + name: "Build package" |
16 | 16 | runs-on: "ubuntu-latest" |
| 17 | + outputs: |
| 18 | + artifact-id: "${{ steps.upload-artifact.outputs.artifact-id }}" |
17 | 19 |
|
18 | 20 | steps: |
19 | 21 | - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" |
20 | 22 | with: |
21 | 23 | persist-credentials: false |
22 | 24 |
|
23 | 25 | - name: "Set up Python" |
24 | | - uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" |
| 26 | + uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" |
25 | 27 | with: |
26 | 28 | python-version: "3.12" |
27 | 29 |
|
28 | 30 | - name: "Build the package" |
29 | | - run: "python -m pip install nox; nox --session build" |
| 31 | + run: "python -m pip install nox; nox -s build" |
30 | 32 |
|
31 | 33 | - name: "Store the distribution packages" |
32 | | - uses: "actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b" |
| 34 | + id: "upload-artifact" |
| 35 | + uses: "actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02" |
33 | 36 | with: |
34 | | - name: "python-package-distributions" |
35 | | - path: "dist/" |
| 37 | + path: "./dist" |
36 | 38 |
|
37 | 39 | publish-to-pypi: |
38 | 40 | name: "Publish Python Distribution to PyPI" |
39 | | - if: startsWith(github.ref, 'refs/tags/') |
40 | 41 | needs: ["build"] |
41 | 42 | runs-on: "ubuntu-latest" |
42 | 43 | environment: |
43 | 44 | name: "pypi" |
44 | | - url: "https://pypi.org/p/commented-configparser" |
| 45 | + url: "https://pypi.org/project/commented-configparser/" |
45 | 46 | permissions: |
46 | 47 | id-token: "write" |
47 | 48 |
|
48 | 49 | steps: |
49 | 50 | - name: "Download all the dists" |
50 | | - uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" |
| 51 | + uses: "actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093" |
51 | 52 | with: |
52 | | - name: "python-package-distributions" |
53 | | - path: "dist/" |
| 53 | + artifact-ids: "${{ needs.build.outputs.artifact-id }}" |
| 54 | + path: "./dist" |
| 55 | + merge-multiple: true |
54 | 56 |
|
55 | 57 | - name: "Publish distribution to PyPI" |
56 | 58 | uses: "pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc" |
| 59 | + with: |
| 60 | + repository-url: "https://upload.pypi.org/legacy/" |
| 61 | + verbose: true |
0 commit comments