[Release](Nightly) Publish #953
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
}); |