Skip to content

Commit 806d3a8

Browse files
author
Shengjie Xu
committed
Update PyPI upload scripts
1 parent 0132575 commit 806d3a8

File tree

3 files changed

+34
-38
lines changed

3 files changed

+34
-38
lines changed

.github/workflows/publish.yml

+16-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ on: [workflow_dispatch]
44

55
jobs:
66
publish:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
matrix:
10-
os: [ubuntu-latest]
7+
runs-on: ubuntu-latest
8+
environment:
9+
name: pypi
10+
url: https://pypi.org/project/preppipe/
11+
permissions:
12+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1113
steps:
12-
- uses: actions/checkout@v4
13-
- uses: ./.github/actions/build
14+
- name: "Download release"
15+
id: download_main
16+
uses: robinraju/[email protected]
17+
with:
18+
tag: "latest-main"
19+
fileName: "*.whl"
20+
tarBall: false
21+
zipBall: false
22+
out-file-path: "dist"
1423
- uses: pypa/gh-action-pypi-publish@release/v1
1524
with:
16-
user: __token__
17-
password: ${{ secrets.PYPI_API_TOKEN }}
1825
verbose: true
26+
print-hash: true

.github/workflows/publish_testpypi.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@ on: [workflow_dispatch]
44

55
jobs:
66
publish:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
matrix:
10-
os: [ubuntu-latest]
7+
runs-on: ubuntu-latest
8+
environment:
9+
name: testpypi
10+
url: https://pypi.org/project/preppipe/
11+
permissions:
12+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1113
steps:
12-
- uses: actions/checkout@v4
13-
- uses: ./.github/actions/build
14-
- name: publish to TestPyPI
15-
if: ${{ github.ref == 'refs/heads/main' }}
16-
uses: pypa/gh-action-pypi-publish@release/v1
14+
- name: "Download release"
15+
id: download_main
16+
uses: robinraju/[email protected]
1717
with:
18-
user: __token__
19-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
20-
repository_url: https://test.pypi.org/legacy/
18+
tag: "latest-main"
19+
fileName: "*.whl"
20+
tarBall: false
21+
zipBall: false
22+
out-file-path: "dist"
23+
- uses: pypa/gh-action-pypi-publish@release/v1
24+
with:
25+
repository-url: https://test.pypi.org/legacy/
2126
verbose: true
27+
print-hash: true

.github/workflows/pyinstaller_build.yml

-18
This file was deleted.

0 commit comments

Comments
 (0)