Browse Source

Merge pull request #332 from CloudVE/split-publish-job

CI hygiene: split deploy job + dedicated env, skip CI on docs-only changes
Keith Suderman 13 hours ago
parent
commit
4d7999ac87

+ 19 - 6
.github/workflows/deploy.yaml

@@ -6,13 +6,9 @@ on:
     tags:
     tags:
       - '*'
       - '*'
 
 
-permissions:
-  contents: read
-  id-token: write  # Required for trusted publishing to PyPI
-
 jobs:
 jobs:
-  build-n-publish:
-    name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
+  build_packages:
+    name: Build Python 🐍 distributions 📦
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
     - uses: actions/checkout@v6
     - uses: actions/checkout@v6
@@ -31,6 +27,23 @@ jobs:
         python3 -m build
         python3 -m build
         twine check dist/*
         twine check dist/*
         ls -l dist
         ls -l dist
+    - uses: actions/upload-artifact@v7
+      with:
+        name: packages
+        path: dist/
+
+  publish:
+    name: Publish distributions 📦 to PyPI and TestPyPI
+    needs: [build_packages]
+    runs-on: ubuntu-latest
+    environment: pypi
+    permissions:
+      id-token: write  # Required for trusted publishing to PyPI
+    steps:
+    - uses: actions/download-artifact@v8
+      with:
+        name: packages
+        path: dist
     - name: Publish distribution 📦 to Test PyPI
     - name: Publish distribution 📦 to Test PyPI
       uses: pypa/gh-action-pypi-publish@v1.14.0
       uses: pypa/gh-action-pypi-publish@v1.14.0
       with:
       with:

+ 10 - 0
.github/workflows/integration-cloud.yaml

@@ -26,8 +26,18 @@ name: Cloud integration tests
 on:
 on:
   pull_request_target:
   pull_request_target:
     types: [labeled]
     types: [labeled]
+    paths-ignore:
+    - 'docs/**'
+    - '**.md'
+    - '**.rst'
+    - LICENSE
   push:
   push:
     branches: [main]
     branches: [main]
+    paths-ignore:
+    - 'docs/**'
+    - '**.md'
+    - '**.rst'
+    - LICENSE
   workflow_dispatch: {}
   workflow_dispatch: {}
 
 
 permissions:
 permissions:

+ 10 - 0
.github/workflows/integration.yaml

@@ -12,9 +12,19 @@ on:
   push:
   push:
     branches:
     branches:
     - main
     - main
+    paths-ignore:
+    - 'docs/**'
+    - '**.md'
+    - '**.rst'
+    - LICENSE
   pull_request:
   pull_request:
     branches:
     branches:
       - main
       - main
+    paths-ignore:
+    - 'docs/**'
+    - '**.md'
+    - '**.rst'
+    - LICENSE
   workflow_dispatch: {}
   workflow_dispatch: {}
 
 
 permissions:
 permissions: