Skip to content

[Release](Hotfix) Create Branch #44

[Release](Hotfix) Create Branch

[Release](Hotfix) Create Branch #44

name: "[Release](Hotfix) Create Branch"
on:
workflow_dispatch:
jobs:
create-hotfix:
name: Create Hotfix
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max-old-space-size=7168"
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@v3
with:
ref: main
token: ${{ steps.generate-token.outputs.token }}
- name: set git user
run: |
git config user.email "105061298+live-github-bot[bot]@users.noreply.github.com"
git config user.name "live-github-bot[bot]"
- name: create hotfix branch
run: |
git checkout -b hotfix
- name: Setup the toolchain
uses: ./tools/actions/composites/setup-toolchain
- name: install dependencies
run: pnpm i -F "ledger-live"
- name: enter prerelease mode
run: pnpm changeset pre enter hotfix
- name: commit
run: |
git add .
git commit -m "chore(hotfix) :rocket: entering hotfix mode"
- name: Get date
id: date
run: |
echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- name: push
run: |
git push origin hotfix
gh pr create --title ":fire: Hotfix ${{ steps.date.outputs.date }}" -F ./.github/templates/hotfix.md --base main --head hotfix
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}