-
Notifications
You must be signed in to change notification settings - Fork 354
72 lines (70 loc) · 2.58 KB
/
release-create.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: true
- 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 }}