From 0f31fa31db722efce04be2f5763df26093c54327 Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Wed, 22 Jan 2025 14:56:20 +0000 Subject: [PATCH] release: pass calling workflow name and check for this in release-final --- .github/workflows/release-final.yml | 8 ++++++-- .github/workflows/release-prepare-hotfix.yml | 1 + .github/workflows/release-prepare.yml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-final.yml b/.github/workflows/release-final.yml index 18fd9b994731..45426c2ab3ac 100644 --- a/.github/workflows/release-final.yml +++ b/.github/workflows/release-final.yml @@ -7,6 +7,10 @@ on: description: "the ref (branch) to release from" required: false default: main + caller: + type: string + description: "the workflow that called this one" + required: true workflow_dispatch: inputs: app: @@ -73,12 +77,12 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} - name: check if desktop versions are different - if: ${{ github.event_name == 'workflow_call' }} + if: ${{ inputs.caller == 'release-prepare' || inputs.caller == 'release-prepare-hotfix' }} id: desktop-changed run: | echo "status=$(git diff HEAD HEAD~1 ./apps/ledger-live-desktop/package.json | grep '"version": "' | wc -l)" >> $GITHUB_OUTPUT - name: check if mobile versions are different - if: ${{ github.event_name == 'workflow_call' }} + if: ${{ inputs.caller == 'release-prepare' || inputs.caller == 'release-prepare-hotfix' }} id: mobile-changed run: | echo "status=$(git diff HEAD HEAD~1 ./apps/ledger-live-mobile/package.json | grep '"version": "' | wc -l)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-prepare-hotfix.yml b/.github/workflows/release-prepare-hotfix.yml index e99931691464..b8f7352a7684 100644 --- a/.github/workflows/release-prepare-hotfix.yml +++ b/.github/workflows/release-prepare-hotfix.yml @@ -127,4 +127,5 @@ jobs: uses: LedgerHQ/ledger-live/.github/workflows/release-final.yml@develop with: ref: hotfix + caller: release-prepare-hotfix secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release-prepare.yml b/.github/workflows/release-prepare.yml index 3a009e3f5c94..acdc21a3ac8d 100644 --- a/.github/workflows/release-prepare.yml +++ b/.github/workflows/release-prepare.yml @@ -82,4 +82,5 @@ jobs: uses: LedgerHQ/ledger-live/.github/workflows/release-final.yml@develop with: ref: main + caller: release-prepare secrets: inherit \ No newline at end of file