Skip to content

Commit

Permalink
release: pass calling workflow name and check for this in release-final
Browse files Browse the repository at this point in the history
  • Loading branch information
angusbayley committed Jan 22, 2025
1 parent 66f59d6 commit 0f31fa3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release-final.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-prepare-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ jobs:
uses: LedgerHQ/ledger-live/.github/workflows/release-final.yml@develop
with:
ref: hotfix
caller: release-prepare-hotfix
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ jobs:
uses: LedgerHQ/ledger-live/.github/workflows/release-final.yml@develop
with:
ref: main
caller: release-prepare
secrets: inherit

0 comments on commit 0f31fa3

Please sign in to comment.