summaryrefslogtreecommitdiffstats
path: root/.github/workflows/python-publish.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/python-publish.yml')
-rw-r--r--.github/workflows/python-publish.yml18
1 files changed, 17 insertions, 1 deletions
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index fdba150..1b55437 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -9,7 +9,20 @@ permissions:
contents: read
jobs:
+ should-deploy-rs:
+ runs-on: ubuntu-latest
+ outputs:
+ deploy: ${{ steps.set_deploy.outputs.deploy }}
+ steps:
+ - uses: actions/checkout@v3
+ - id: check_deploy
+ run: |
+ bash ./.github/workflows/should_deploy_sqlglotrs.sh
+ if [ $? -eq 0 ]; then echo "deploy=true" >> $GITHUB_OUTPUT; fi
+
build-rs:
+ needs: should-deploy-rs
+ if: needs.should-deploy-rs.outputs.deploy == 'true'
strategy:
matrix:
os: [linux, macos, windows]
@@ -51,6 +64,8 @@ jobs:
path: sqlglotrs/dist
sdist-rs:
+ needs: should-deploy-rs
+ if: needs.should-deploy-rs.outputs.deploy == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -67,8 +82,9 @@ jobs:
path: sqlglotrs/dist
deploy-rs:
+ needs: [should-deploy-rs, build-rs, sdist-rs]
+ if: needs.should-deploy-rs.outputs.deploy == 'true'
runs-on: ubuntu-latest
- needs: [build-rs, sdist-rs]
steps:
- uses: actions/download-artifact@v3
with: