diff --git a/.github/workflows/deploy-staged.yml b/.github/workflows/deploy-staged.yml index 7f6cf9ff..70ae7500 100644 --- a/.github/workflows/deploy-staged.yml +++ b/.github/workflows/deploy-staged.yml @@ -8,6 +8,11 @@ jobs: code-tests: uses: "./.github/workflows/reusable-tests.yml" + release-datahub-client: + needs: code-tests + if: ${{ needs.code-tests.outputs.datahub-client-path == 'true' }} + uses: "./.github/workflows/reusable-release-datahub-client.yml" + deploy-test: uses: "./.github/workflows/reusable-build-and-deploy.yml" needs: code-tests diff --git a/.github/workflows/publish-datahub-client.yml b/.github/workflows/reusable-publish-datahub-client.yml similarity index 76% rename from .github/workflows/publish-datahub-client.yml rename to .github/workflows/reusable-publish-datahub-client.yml index 67eb35a3..17d6c2d0 100644 --- a/.github/workflows/publish-datahub-client.yml +++ b/.github/workflows/reusable-publish-datahub-client.yml @@ -2,9 +2,7 @@ name: Release Datahub Client library on: - push: - tags: - - "datahub-client-v*.*.*" + workflow_call: permissions: read-all @@ -30,14 +28,11 @@ jobs: with: python-version: "3.10" - - name: Install Poetry - id: install_poetry - run: | - curl -sSL "https://install.python-poetry.org" | python3 - - echo "${HOME}/.poetry/bin" >>"${GITHUB_PATH}" + - name: Install poetry + run: pipx install poetry - name: Build a distribution - id: build_distribution + id: build-distribution run: | poetry build diff --git a/.github/workflows/reusable-tests.yml b/.github/workflows/reusable-tests.yml index 2e572112..088cac18 100644 --- a/.github/workflows/reusable-tests.yml +++ b/.github/workflows/reusable-tests.yml @@ -2,6 +2,10 @@ name: Deploy on: workflow_call: + outputs: + datahub-client-path: + description: "Boolean string indicating if files in the the datahub-client were changed" + value: ${{ jobs.datahub-client-path-filter.steps.changes.outputs.datahub-client }} jobs: datahub-client-path-filter: