chaokunyang commented on code in PR #2522:
URL: https://github.com/apache/fory/pull/2522#discussion_r2298169703


##########
.github/workflows/build-native-pr.yml:
##########
@@ -51,3 +55,36 @@ jobs:
           python -m pip install --upgrade pip
           pip install dist/*.whl
           python -c "import pyfory; print(pyfory.__version__)"
+      - name: Upload wheels as artifacts
+        uses: actions/upload-artifact@v4
+        with:
+          name: pyfory-wheels-native-${{ matrix.os }}-${{ 
matrix.python-version }}
+          path: dist/*.whl
+
+  publish-to-testpypi:
+    name: Publish to TestPyPI
+    needs: build
+    runs-on: ubuntu-latest
+    steps:
+      - name: Download all wheel artifacts
+        uses: actions/download-artifact@v5
+        with:
+          pattern: "pyfory-wheels-native-*"
+          path: downloaded_wheels
+          merge-multiple: true
+
+      - name: Move wheels to a single directory
+        shell: bash
+        run: |
+          mkdir dist
+          find downloaded_wheels -type f -name "*.whl" -exec mv {} dist/ \;
+          ls -R dist
+
+      - name: Publish to TestPyPI

Review Comment:
   Great! If we can automatically delete the same artifacts after the run, this 
would work. Do you know how to implement that automatically?
   
   But I think maybe we should only publish to testpypi for commit in main 
branch. Otherwise anyone can open a PR, change pyfory code, and upload anything 
to testpypi



-- 
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