diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 46d2d86d2..56f92445e 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -91,9 +91,9 @@ jobs: - name: Proto Subpackage Publish Required id: proto-required run: | - PUBLISH_REQUIRED="true" + PUBLISH_REQUIRED="false" if ! curl -sSLf "https://registry.npmjs.org/@hashgraph/proto/${{ steps.npm-package.outputs.proto-version }}" >/dev/null 2>&1; then - PUBLISH_REQUIRED="false" + PUBLISH_REQUIRED="true" fi echo "publish-required=${PUBLISH_REQUIRED}" >>"${GITHUB_OUTPUT}" @@ -101,9 +101,9 @@ jobs: - name: Crypto Subpackage Publish Required id: crypto-required run: | - PUBLISH_REQUIRED="true" + PUBLISH_REQUIRED="false" if ! curl -sSLf "https://registry.npmjs.org/@hashgraph/cryptography/${{ steps.npm-package.outputs.crypto-version }}" >/dev/null 2>&1; then - PUBLISH_REQUIRED="false" + PUBLISH_REQUIRED="true" fi echo "publish-required=${PUBLISH_REQUIRED}" >>"${GITHUB_OUTPUT}" @@ -300,7 +300,7 @@ jobs: - name: Calculate Proto Subpackage Publish Arguments id: proto-publish working-directory: packages/proto - if: ${{ steps.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} + if: ${{ needs.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} run: | PUBLISH_ARGS="--access public --no-git-checks" [[ "${{ github.event.inputs.dry-run-enabled }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --dry-run" @@ -314,7 +314,7 @@ jobs: - name: Calculate Crypto Subpackage Publish Arguments id: crypto-publish working-directory: packages/cryptography - if: ${{ steps.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} + if: ${{ needs.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} run: | PUBLISH_ARGS="--access public --no-git-checks" [[ "${{ github.event.inputs.dry-run-enabled }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --dry-run" @@ -341,26 +341,26 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/proto - if: ${{ steps.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} - run: task -v publish -- ${{ steps.proto-publish.outputs.args }} + if: ${{ needs.validate-release.outputs.proto-publish-required == 'true' && !cancelled() && !failure() }} + run: task -v publish -- ${{ needs.proto-publish.outputs.args }} - name: Publish Cryptography Release env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/cryptography - if: ${{ steps.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} - run: task -v publish -- ${{ steps.crypto-publish.outputs.args }} + if: ${{ needs.validate-release.outputs.crypto-publish-required == 'true' && !cancelled() && !failure() }} + run: task -v publish -- ${{ needs.crypto-publish.outputs.args }} - name: Publish SDK Release env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: task -v publish -- ${{ steps.sdk-publish.outputs.args }} + run: task -v publish -- ${{ needs.sdk-publish.outputs.args }} - name: Generate Github Release uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 if: ${{ github.event.inputs.dry-run-enabled != 'true' && !cancelled() && !failure() }} with: - tag: ${{ steps.validate-release.outputs.tag }} + tag: ${{ needs.validate-release.outputs.tag }} prerelease: ${{ needs.validate-release.outputs.prerelease == 'true' }} draft: false generateReleaseNotes: true