Quellcode durchsuchen

Fix Packaging action

(cherry picked from commit 546517f92dfa8f6efddbb3a0d6bebbc747da6774)
dinhlongnguyen vor 1 Jahr
Ursprung
Commit
2dd9adeb3f
1 geänderte Dateien mit 20 neuen und 0 gelöschten Zeilen
  1. 20 0
      .github/workflows/packaging.yml

+ 20 - 0
.github/workflows/packaging.yml

@@ -28,6 +28,26 @@ jobs:
         with:
           python-version: ${{ matrix.python-versions }}
 
+      - name: Get taipy-gui version from setup.py
+        id: taipy_gui_version
+        run: |
+          echo """
+          with open('setup.py') as f:
+              for line in f:
+                  if 'taipy-gui' in line:
+                      start = line.find('taipy-gui')
+                      end = line.rstrip().find('\",')
+                      print(f'VERSION={line[start:end]}')
+                      break
+          """ > ${{ runner.temp }}/get_gui_version.py
+          python ${{ runner.temp }}/get_gui_version.py >> $GITHUB_OUTPUT
+
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          # install taipy-gui from based on setup.py version
+          pip install "${{ steps.taipy_gui_version.outputs.VERSION }}"
+
       - name: Install Taipy without dependencies
         run: |
           pip install .