From b36c87c23a453b00f4aefb1004c9b737c43704d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Musil?= Date: Mon, 4 Sep 2023 13:11:19 +0200 Subject: [PATCH 1/2] chore: fix when publish step should happen --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d8af594..cfeddfd8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,7 +93,7 @@ jobs: # when host-python is skipped this job should still run if inputs allow # so we need to include a status check, then manually ensure core build didn't fail # (see https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions) - if: ${{ !cancelled() && (needs.core.result == 'success') && (inputs.host == 'js' || inputs.host == 'all') }} + if: ${{ !cancelled() && needs.core.result == 'success' && (inputs.host == 'js' || inputs.host == 'all') }} runs-on: ubuntu-latest outputs: RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }} @@ -187,7 +187,7 @@ jobs: host-javascript-publish: name: Publish JavaScript Host needs: [core, host-javascript-prepare] - if: ${{ inputs.host == 'js' || inputs.host == 'all' }} + if: ${{ !cancelled() && needs.host-javascript-prepare.result == 'success' }} runs-on: ubuntu-latest steps: # Setup @@ -307,7 +307,7 @@ jobs: host-python-publish: name: Publish Python Host needs: [core, host-python-prepare] - if: ${{ inputs.host == 'python' || inputs.host == 'all' }} + if: ${{ !cancelled() && needs.host-python-prepare.result == 'success' }} runs-on: ubuntu-latest steps: # Setup From 373e9a7521e5782ff317000f92045f166ee91c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Musil?= Date: Mon, 4 Sep 2023 13:29:54 +0200 Subject: [PATCH 2/2] chore(ci/cd): update package.json version --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cfeddfd8..42f54924 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -122,6 +122,10 @@ jobs: - name: Resolve release version id: release-version run: scripts/release-version.sh ./host/javascript/VERSION ${{ steps.release-level.outputs.RELEASE_LEVEL }} ${{ steps.release-level.outputs.RELEASE_PREID }} >>$GITHUB_OUTPUT + # Update version + - name: Update version in package.json + working-directory: host/python + run: yarn version --no-git-tag-version --new-version ${{ steps.release-version.outputs.RELEASE_VERSION }} # Build - uses: actions/download-artifact@v3 with: @@ -245,7 +249,7 @@ jobs: # Update version - name: Update version in pyproject working-directory: host/python - run: toml set --toml-path pyproject.toml project.version ${{ steps.release-version.outputs.RELEASE_VERSION }} + run: toml set --toml-path pyproject.toml project.version ${{ steps.release-version.outputs.RELEASE_VERSION }} # Build - uses: actions/download-artifact@v3 with: