This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 0b3505b5b ci: dry run publish on rc tags for python binding (#3645)
0b3505b5b is described below

commit 0b3505b5b549c91d3c8733a16c298aa380fc6caa
Author: everpcpc <[email protected]>
AuthorDate: Wed Nov 22 16:41:31 2023 +0800

    ci: dry run publish on rc tags for python binding (#3645)
    
    ci: dry run on rc tags for python binding
---
 .github/workflows/bindings_python.yml | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/bindings_python.yml 
b/.github/workflows/bindings_python.yml
index 8c26c2dc0..919c5262a 100644
--- a/.github/workflows/bindings_python.yml
+++ b/.github/workflows/bindings_python.yml
@@ -113,7 +113,7 @@ jobs:
   release:
     name: Release
     runs-on: ubuntu-latest
-    if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')"
+    if: "startsWith(github.ref, 'refs/tags/')"
     permissions:
       contents: read
       id-token: write
@@ -123,7 +123,16 @@ jobs:
         with:
           name: wheels
           path: bindings/python/dist
-      - uses: pypa/gh-action-pypi-publish@release/v1
+      - name: Publish to TestPyPI
+        uses: pypa/gh-action-pypi-publish@release/v1
+        if: "contains(github.ref, '-')"
+        with:
+          repository-url: https://test.pypi.org/legacy/
+          skip-existing: true
+          packages-dir: bindings/python/dist
+      - name: Publish to PyPI
+        uses: pypa/gh-action-pypi-publish@release/v1
+        if: "!contains(github.ref, '-')"
         with:
           skip-existing: true
           packages-dir: bindings/python/dist

Reply via email to