Skip to content

Commit 700261d

Browse files
authored
Refactor GitHub Actions for PyPI publishing (#3334)
Commented out the publish-pypi-test and publish-delayed jobs. Updated publish-pypi-main to remove dependency on publish-delayed and added permissions.
1 parent 2ec81e6 commit 700261d

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

.github/workflows/publish-pkg.yml

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,39 +54,41 @@ jobs:
5454
files: "dist/*"
5555
repo-token: ${{ secrets.GITHUB_TOKEN }}
5656

57-
publish-pypi-test:
58-
needs: build-package
59-
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
60-
runs-on: ubuntu-latest
61-
timeout-minutes: 5
62-
steps:
63-
- uses: actions/download-artifact@v5
64-
with:
65-
name: pypi-packages-${{ github.sha }}
66-
path: dist
67-
- run: ls -lh dist/
68-
# We do this, since failures on test.pypi aren't that bad
69-
- name: Publish to Test PyPI
70-
uses: pypa/gh-action-pypi-publish@v1.13.0
71-
with:
72-
user: __token__
73-
password: ${{ secrets.test_pypi_password }}
74-
repository_url: https://test.pypi.org/legacy/
75-
verbose: true
57+
# publish-pypi-test:
58+
# needs: build-package
59+
# if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
60+
# runs-on: ubuntu-latest
61+
# timeout-minutes: 5
62+
# steps:
63+
# - uses: actions/download-artifact@v5
64+
# with:
65+
# name: pypi-packages-${{ github.sha }}
66+
# path: dist
67+
# - run: ls -lh dist/
68+
# # We do this, since failures on test.pypi aren't that bad
69+
# - name: Publish to Test PyPI
70+
# uses: pypa/gh-action-pypi-publish@v1.13.0
71+
# with:
72+
# user: __token__
73+
# password: ${{ secrets.test_pypi_password }}
74+
# repository_url: https://test.pypi.org/legacy/
75+
# verbose: true
7676

77-
publish-delayed:
78-
needs: publish-pypi-test
79-
runs-on: ubuntu-latest
80-
steps:
81-
- uses: juliangruber/sleep-action@v2
82-
with:
83-
time: 5m
77+
# publish-delayed:
78+
# needs: publish-pypi-test
79+
# runs-on: ubuntu-latest
80+
# steps:
81+
# - uses: juliangruber/sleep-action@v2
82+
# with:
83+
# time: 5m
8484

8585
publish-pypi-main:
86-
needs: [build-package, publish-delayed]
86+
needs: [build-package] #, publish-delayed]
8787
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
8888
runs-on: ubuntu-latest
8989
timeout-minutes: 5
90+
permissions:
91+
id-token: write
9092
steps:
9193
- uses: actions/download-artifact@v5
9294
with:
@@ -95,7 +97,3 @@ jobs:
9597
- run: ls -lh dist/
9698
- name: Publish distribution 📦 to PyPI
9799
uses: pypa/gh-action-pypi-publish@v1.13.0
98-
with:
99-
user: __token__
100-
password: ${{ secrets.pypi_password }}
101-
verbose: true

0 commit comments

Comments
 (0)