SYaoJun commented on code in PR #933:
URL: https://github.com/apache/incubator-graphar/pull/933#discussion_r3393306459


##########
.github/workflows/python-wheel-workflow.yml:
##########
@@ -273,11 +273,35 @@ jobs:
         run: |
           mkdir -p python/dist
           find dist -name "*" -type f -exec mv {} python/dist/ \;
-      - name: Publish to Test PyPI
-        uses: pypa/gh-action-pypi-publish@release/v1
+      - name: Set up Python
+        uses: actions/setup-python@v5
         with:
-          repository-url: https://test.pypi.org/legacy/
-          packages-dir: python/dist/
+          python-version: "3.x"
+
+      - name: Publish to Test PyPI
+        run: |
+          set -euo pipefail
+          pip install twine
+
+          # Mint a short-lived API token via PyPI Trusted Publisher (OIDC)
+          OIDC_TOKEN=$(curl -sS \
+            -H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" \
+            "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=testpypi" \
+            | python3 -c "import sys, json; 
print(json.load(sys.stdin)['value'])")

Review Comment:
   Consider using `python` rather than `python3` to comform with previous L254 
code. 



##########
.github/workflows/python-wheel-workflow.yml:
##########
@@ -297,7 +321,30 @@ jobs:
         run: |
           mkdir -p python/dist
           find dist -name "*" -type f -exec mv {} python/dist/ \;
-      - name: Publish to PyPI
-        uses: 
pypa/gh-action-pypi-publish@release/2473ec6c6aa87f38946284d51289219fd0b87264
+      - name: Set up Python
+        uses: actions/setup-python@v5
         with:
-          packages-dir: python/dist/
\ No newline at end of file
+          python-version: "3.x"
+
+      - name: Publish to PyPI
+        run: |
+          set -euo pipefail
+          pip install twine

Review Comment:
   Consider using a fixed version, such as `pip install twine==5.1.1`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to