-
Notifications
You must be signed in to change notification settings - Fork 345
106 lines (104 loc) · 3.74 KB
/
release-final-nightly.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: "[Release](Nightly) Publish"
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
jobs:
nightly-release:
name: Nightly Release
runs-on: ubuntu-24.04
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 }}
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: nightly
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
- name: merge develop
run: |
git merge origin/develop -X theirs
- name: Setup the caches
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-caches@develop
id: setup-caches
with:
install-proto: true
skip-turbo-cache: "false"
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
# Not needed with a .ruby-version file
# runs 'bundle install' and caches installed gems automatically
- uses: LedgerHQ/ledger-live/tools/actions/get-package-infos@develop
id: desktop-version
with:
path: ${{ github.workspace }}/apps/ledger-live-desktop
- uses: LedgerHQ/ledger-live/tools/actions/get-package-infos@develop
id: mobile-version
with:
path: ${{ github.workspace }}/apps/ledger-live-mobile
- name: install dependencies
run: pnpm i -F "ledger-live" -F "{libs/**}..." -F "@ledgerhq/live-cli"
- name: build libs
run: pnpm run build:libs
- name: versioning
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm changeset version
- name: commit
run: |
git add .
git commit -m "chore(nightly): :rocket: nightly release"
- name: authenticate with npm
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
- name: publish nightly
run: pnpm changeset publish --no-git-tag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- uses: LedgerHQ/ledger-live/tools/actions/get-package-infos@develop
id: post-desktop-version
with:
path: ${{ github.workspace }}/apps/ledger-live-desktop
- uses: LedgerHQ/ledger-live/tools/actions/get-package-infos@develop
id: post-mobile-version
with:
path: ${{ github.workspace }}/apps/ledger-live-mobile
- name: push changes
if: ${{ !cancelled() }}
run: |
git push origin nightly
- uses: actions/github-script@v7
name: trigger nightly build of desktop
if: ${{ steps.desktop-version.outputs.version != steps.post-desktop-version.outputs.version }}
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: "ledgerhq",
repo: "ledger-live-build",
ref: "main",
workflow_id: "nightly-desktop.yml",
});
- uses: actions/github-script@v7
name: trigger nightly build of mobile
if: ${{ steps.mobile-version.outputs.version != steps.post-mobile-version.outputs.version }}
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: "ledgerhq",
repo: "ledger-live-build",
ref: "main",
workflow_id: "nightly-mobile.yml",
});