Skip to content

[Release] Create Branch #111

[Release] Create Branch

[Release] Create Branch #111

name: "[Release] Create Branch"
on:
workflow_dispatch:
jobs:
create-release:
name: Create Release
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: "--max-old-space-size=7168"
RELEASE_BRANCH: "release"
steps:
- name: generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: develop
token: ${{ steps.generate-token.outputs.token }}
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
- name: create release branch
run: |
git checkout -b $RELEASE_BRANCH
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
- name: install dependencies
run: pnpm i
- name: Build libs
run: pnpm build:libs
- name: import CAL tokens
run: pnpm import:cal-tokens
- name: commit new tokens
run: |
git add .
git commit -m 'chore(prerelease) update cryptoassets' || echo "No new tokens added"
- name: update sortByMarketcap snapshot
run: pnpm common jest --runTestsByPath src/currencies/sortByMarketcap.test.ts -u
- name: commit sortByMarketcap.test.ts
run: |
git add .
git commit -m 'update sortByMarketcap snapshot' || echo "No changes in snapshot of sortByMarketcap.test.ts"
- 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
uses: LedgerHQ/ledger-live/tools/actions/composites/adjust-changeset-level@develop
with:
from_level: patch
to_level: minor
- name: enter prerelease mode
run: pnpm changeset pre enter next
- name: commit
run: |
git add .
git commit -m "chore(prerelease): :rocket: entering prerelease mode"
- name: Get date
id: date
run: |
echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- name: push
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 }}