forked from LedgerHQ/ledger-live-desktop
104 lines (103 loc) · 3.74 KB
/
build-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
name: nightly build
on:
schedule:
- cron: "0 22 * * 1-5"
jobs:
nightly-macos:
runs-on: macos-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/setup-node@main
with:
node-version: 12.x
- name: install dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: set beta name
uses: ./.github/actions/change-product-name
- name: build the app
run: yarn nightly
- uses: ledgerhq/actions/get-package-infos@v2.0.0
id: version
- name: upload macOS app
uses: actions/upload-artifact@v1
with:
name: ${{ steps.version.outputs.name }}-${{ steps.version.outputs.version }}-macos.dmg
path: dist/${{ steps.version.outputs.name }}-${{ steps.version.outputs.version }}-mac.dmg
nightly-linux:
runs-on: ubuntu-16.04
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@main
with:
node-version: 12.x
- name: install linux dependencies
run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: set beta name
uses: ./.github/actions/change-product-name
- name: build the app
run: yarn nightly
- uses: ledgerhq/actions/get-package-infos@v2.0.0
id: version
- name: upload linux app
uses: actions/upload-artifact@v1
with:
name: ${{ steps.version.outputs.name }}-${{ steps.version.outputs.version }}-linux.AppImage
path: dist/${{ steps.version.outputs.name }}-${{ steps.version.outputs.version }}-linux-x86_64.AppImage
nightly-windows:
runs-on: windows-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@main
with:
node-version: 12.x
- uses: actions/setup-python@v1
with:
python-version: "2.7.x"
- name: get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: set beta name
uses: ./.github/actions/change-product-name
- name: build the app
run: yarn nightly
- uses: ledgerhq/actions/get-package-infos@v2.0.0
id: version
- name: upload windows
uses: actions/upload-artifact@v1
with:
name: ${{ steps.version.outputs.name }}-${{ steps.version.outputs.version }}-win.exe
path: dist/${{ steps.version.outputs.name }}-${{ steps.version.outputs.version }}-win.exe