Skip to content

Commit

Permalink
Merge pull request #9415 from LedgerHQ/revert-9389-revert-9335-suppor…
Browse files Browse the repository at this point in the history
…t/signed-release-commits

Re-implement verified commits in all remaining parts of the release workflows
  • Loading branch information
angusbayley authored Mar 7, 2025
2 parents c856271 + 830806b commit dcbbae3
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 43 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release-create-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: create hotfix branch
run: |
git checkout -b hotfix
git push -u origin hotfix
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
Expand All @@ -77,17 +78,23 @@ jobs:

- name: enter prerelease mode
run: pnpm changeset pre enter hotfix
- name: commit
- name: git add
run: |
git add .
git commit -m "chore(hotfix) :rocket: entering hotfix mode"
- name: commit changes
uses: planetscale/[email protected]
with:
commit_message: "chore(hotfix) :rocket: entering hotfix mode"
repo: ${{ github.repository }}
branch: hotfix
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Get date
id: date
run: |
echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- name: push
- name: create PR to main
run: |
git push origin hotfix
gh pr create \
--title ":fire: Hotfix ${{ steps.date.outputs.date }} (targeting ${{ github.event.inputs.application }} ${{ github.event.inputs.tag_version }})"\
-F ./.github/templates/hotfix.md \
Expand Down
45 changes: 37 additions & 8 deletions .github/workflows/release-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: create release branch
run: |
git checkout -b $RELEASE_BRANCH
git push -u origin $RELEASE_BRANCH
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
Expand All @@ -37,16 +38,34 @@ jobs:
run: pnpm build:libs
- name: import CAL tokens
run: pnpm import:cal-tokens
- name: commit new tokens
- name: Add changed files
run: |
git add .
git commit -m 'chore(prerelease) update cryptoassets' || echo "No new tokens added"
- name: commit new tokens
uses: planetscale/[email protected]
with:
commit_message: "chore(prerelease) update cryptoassets"
repo: ${{ github.repository }}
branch: ${{ env.RELEASE_BRANCH }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: update sortByMarketcap snapshot
run: pnpm common jest --runTestsByPath src/currencies/sortByMarketcap.test.ts -u
- name: commit sortByMarketcap.test.ts
- name: Add changed files
run: |
git stash
git fetch origin $RELEASE_BRANCH # make sure previous commit is included
git pull --rebase origin $RELEASE_BRANCH # make sure previous commit is included
git stash pop
git add .
git commit -m 'update sortByMarketcap snapshot' || echo "No changes in snapshot of sortByMarketcap.test.ts"
- name: commit sortByMarketcap.test.ts
uses: planetscale/[email protected]
with:
commit_message: "update sortByMarketcap snapshot"
repo: ${{ github.repository }}
branch: ${{ env.RELEASE_BRANCH }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Move patch updates to minor
# For more info about why we do this, see this doc:
# https://ledgerhq.atlassian.net/wiki/spaces/WALLETCO/pages/4710989838/LL+Incident+Recovery+-+Hotfix+in+all+cases
Expand All @@ -56,17 +75,27 @@ jobs:
to_level: minor
- name: enter prerelease mode
run: pnpm changeset pre enter next
- name: commit
- name: Add changed files
run: |
git stash
git fetch origin $RELEASE_BRANCH # make sure previous commit is included
git pull --rebase origin $RELEASE_BRANCH # make sure previous commit is included
git stash pop
git add .
git commit -m "chore(prerelease): :rocket: entering prerelease mode"
- name: commit
uses: planetscale/[email protected]
with:
commit_message: "chore(prerelease): :rocket: entering prerelease mode"
repo: ${{ github.repository }}
branch: ${{ env.RELEASE_BRANCH }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Get date
id: date
run: |
echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- name: push
- name: create PR
run: |
git push origin $RELEASE_BRANCH
gh pr create --title ":rocket: Release ${{ steps.date.outputs.date }}" -F .github/templates/release.md --base main --head $RELEASE_BRANCH
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
17 changes: 13 additions & 4 deletions .github/workflows/release-prepare-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,23 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm changeset version

- name: commit
- name: git add
run: |
git add .
git commit -m "chore(hotfix): :fire: hotfix release [skip ci]"
- name: push changes
- name: commit
uses: planetscale/[email protected]
with:
commit_message: "chore(hotfix): :fire: hotfix release [skip ci]"
repo: ${{ github.repository }}
branch: ${{ inputs.ref }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

- name: pull commit
run: |
git push origin ${{ inputs.ref }}
git stash
git pull
- name: fetch develop and main
if: ${{ github.event.inputs.tag_version == 'latest' }}
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,23 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm changeset version

- name: commit
- name: git add
run: |
git add .
git commit -m "chore(release): :rocket: prepare release [skip ci]"
- name: push changes
- name: commit
uses: planetscale/[email protected]
with:
commit_message: "chore(release): :rocket: prepare release [skip ci]"
repo: ${{ github.repository }}
branch: ${{ inputs.ref }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

- name: pull commit
run: |
git push origin ${{ inputs.ref }}
git fetch origin
git stash
git pull origin ${{ inputs.ref }}
- name: fetch develop and main
run: |
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/release-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,30 +87,42 @@ jobs:
with:
from_level: major
to_level: patch
- name: Add changed files
run: |
git add .
- name: commit (from release branch)
if: ${{ startsWith(github.ref_name, 'release') }}
uses: planetscale/[email protected]
with:
commit_message: "chore(prerelease): :rocket: release prerelease [${{ env.LLD }}, ${{ env.LLM }}]"
repo: ${{ github.repository }}
branch: ${{ github.ref_name }}
env:
LLD: LLD(${{ steps.post-desktop-version.outputs.version }})
LLM: LLM(${{ steps.post-mobile-version.outputs.version }})
run: |
git add . &&
git commit -m "chore(prerelease): :rocket: release prerelease [${{ env.LLD }}, ${{ env.LLM }}]" ||
echo ""
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: commit (from hotfix branch)
if: ${{ startsWith(github.ref_name, 'hotfix') }}
uses: planetscale/[email protected]
with:
commit_message: "chore(hotfix): :fire: hotfix prerelease [${{ env.LLD }}, ${{ env.LLM }}]"
repo: ${{ github.repository }}
branch: ${{ github.ref_name }}
env:
LLD: LLD(${{ steps.post-desktop-version.outputs.version }})
LLM: LLM(${{ steps.post-mobile-version.outputs.version }})
run: |
git add . &&
git commit -m "chore(hotfix): :fire: hotfix prerelease [${{ env.LLD }}, ${{ env.LLM }}]" ||
echo ""
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: commit (from ${{ inputs.ref }} branch) workflow dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
git add .
git commit -m "chore(prerelease): :rocket: ${{ inputs.ref }} prerelease [LLD(${{ steps.post-desktop-version.outputs.version }}), LLM(${{ steps.post-mobile-version.outputs.version }})]" ||
echo ""
uses: planetscale/[email protected]
with:
commit_message: "chore(prerelease): :rocket: ${{ inputs.ref }} prerelease [LLD(${{ steps.post-desktop-version.outputs.version }}), LLM(${{ steps.post-mobile-version.outputs.version }})]"
repo: ${{ github.repository }}
branch: ${{ inputs.ref }}
env:
LLD: LLD(${{ steps.post-desktop-version.outputs.version }})
LLM: LLM(${{ steps.post-mobile-version.outputs.version }})
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: authenticate with npm
uses: actions/setup-node@v4
with:
Expand All @@ -119,16 +131,6 @@ jobs:
run: pnpm changeset publish --no-git-tag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: push changes (push event)
if: ${{ github.event_name == 'push' }}
run: |
git pull --rebase
git push origin ${{ github.ref_name }}
- name: push changes (other events)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
git pull --rebase
git push origin ${{ inputs.ref }}
- uses: actions/github-script@v7
name: trigger prerelease build for desktop
if: ${{ steps.desktop-version.outputs.version != steps.post-desktop-version.outputs.version }}
Expand Down

0 comments on commit dcbbae3

Please sign in to comment.