Parcourir la source

feat: add publish support for other packages

Joao Andre il y a 1 an
Parent
commit
675ca5ed2e
1 fichiers modifiés avec 8 ajouts et 4 suppressions
  1. 8 4
      .github/workflows/publish.yml

+ 8 - 4
.github/workflows/publish.yml

@@ -31,9 +31,13 @@ jobs:
         run: |
         run: |
           python tools/release/check_releases.py dist ${{ github.event.inputs.version }}
           python tools/release/check_releases.py dist ${{ github.event.inputs.version }}
 
 
-  publish-to-pypi:
+  publish-subpackages-to-pypi:
     needs: [test-package]
     needs: [test-package]
     timeout-minutes: 20
     timeout-minutes: 20
+    strategy:
+      matrix:
+        package: [ config, core, gui, rest, templates ]
+      max-parallel: 1
     environment: publish
     environment: publish
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
@@ -41,7 +45,7 @@ jobs:
 
 
       - name: Download assets from tag
       - name: Download assets from tag
         run: |
         run: |
-          gh release download ${{ github.event.inputs.version }} --dir dist
+          gh release download ${{ github.event.inputs.version }}-${{ matrix.package }} --dir dist
         env:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
 
@@ -49,10 +53,10 @@ jobs:
         uses: pypa/gh-action-pypi-publish@release/v1
         uses: pypa/gh-action-pypi-publish@release/v1
         with:
         with:
           user: __token__
           user: __token__
-          password: ${{ secrets.PYPI_API_TOKEN }}
+          password: ${{ secrets[format('PYPI_API_TOKEN_{0}', matrix.package )] }}
 
 
   test-published-package:
   test-published-package:
-    needs: [publish-to-pypi]
+    needs: [publish-subpackages-to-pypi]
     timeout-minutes: 30
     timeout-minutes: 30
     strategy:
     strategy:
       matrix:
       matrix: