Skip to content

[Release] Create Branch #97

[Release] Create Branch

[Release] Create Branch #97

Workflow file for this run

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-angusbayley-TEST"
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
run: |
for file in .changeset/*.md; do
if grep -q ": patch" "$file"; then
sed -i '/---/!b;n;s/: patch/: minor/' "$file"
echo "Updated $file to minor"
fi
done
- 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: [NOT A REAL RELEASE - TEST ONLY, by @angusbayley] Release ${{ steps.date.outputs.date }}" -F .github/templates/release.md --base main --head $RELEASE_BRANCH
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}