diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7db9d486..8e387950 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,13 +13,14 @@ on: description: Publish backend of main HEAD jobs: + backend: name: Publish backend - if: ${{ github.event.inputs.backend }} runs-on: ubuntu-latest steps: - name: Get artifact - uses: dawidd6/action-download-artifact@v2 # version from GitHub disallows sharing between workflows + if: ${{ github.event.inputs.backend == 'true' }} + uses: dawidd6/action-download-artifact@v2 with: github_token: ${{secrets.GITHUB_TOKEN}} workflow: build_and_test.yml @@ -27,17 +28,17 @@ jobs: commit: ${{ github.sha }} name: backend-${{ github.sha }} - name: Publish on PyPi + if: ${{ github.event.inputs.backend == 'true' }} uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_BACKEND_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ frontend: name: Publish frontend - if: ${{ github.event.inputs.frontend }} runs-on: ubuntu-latest steps: - name: Get artifact + if: ${{ github.event.inputs.frontend == 'true' }} uses: dawidd6/action-download-artifact@v2 # version from GitHub disallows sharing between workflows with: github_token: ${{secrets.GITHUB_TOKEN}} @@ -46,15 +47,15 @@ jobs: commit: ${{ github.sha }} name: frontend-${{ github.sha }} - name: Publish on PyPi + if: ${{ github.event.inputs.frontend == 'true' }} uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_DASH_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ wrapper: needs: [ frontend, backend ] name: Publish container - if: ${{ github.event.inputs.frontend ||github.event.inputs.backend }} + if: ${{ github.event.inputs.frontend == 'true' || github.event.inputs.backend == 'true' }} runs-on: ubuntu-latest steps: - name: Checking out repository