forked from vercel/hyper
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (138 loc) · 5.22 KB
/
nodejs.yml
File metadata and controls
138 lines (138 loc) · 5.22 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Node CI
on:
push:
branches:
- master
- canary
pull_request:
jobs:
ci_macos:
runs-on: macos-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Test
run: yarn run test
- name: Getting Build Icon
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
run: |
cp build/canary.ico build/icon.ico
cp build/canary.icns build/icon.icns
- name: Build
run: yarn run dist --publish=never
env:
CI: true
- name: Get macOS Artifact Names
id: getmacosfilename
run: |
echo "::set-output name=dmgName::$(ls dist/*.dmg | cut -d'/' -f2)"
echo "::set-output name=dmgPath::$(ls dist/*.dmg)"
- name: Archive macOS Build Artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getmacosfilename.outputs.dmgName }}
path: ${{ steps.getmacosfilename.outputs.dmgPath }}
ci_linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Test
run: yarn run test
- name: Getting Build Icon
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
run: |
cp build/canary.ico build/icon.ico
cp build/canary.icns build/icon.icns
- name: Build
run: yarn run dist --publish=never
env:
CI: true
- name: Get Linux Artifact Names
id: getlinuxfilename
run: |
echo "::set-output name=snapName::$(ls dist/*.snap | cut -d'/' -f2)"
echo "::set-output name=snapPath::$(ls dist/*.snap)"
echo "::set-output name=AppImageName::$(ls dist/*.AppImage | cut -d'/' -f2)"
echo "::set-output name=AppImagePath::$(ls dist/*.AppImage)"
echo "::set-output name=debName::$(ls dist/*.deb | cut -d'/' -f2)"
echo "::set-output name=debPath::$(ls dist/*.deb)"
echo "::set-output name=rpmName::$(ls dist/*.rpm | cut -d'/' -f2)"
echo "::set-output name=rpmPath::$(ls dist/*.rpm)"
- name: Archive Linux Build Artifacts (Snap)
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getlinuxfilename.outputs.snapName }}
path: ${{ steps.getlinuxfilename.outputs.snapPath }}
- name: Archive Linux Build Artifacts (AppImage)
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getlinuxfilename.outputs.AppImageName }}
path: ${{ steps.getlinuxfilename.outputs.AppImagePath }}
- name: Archive Linux Build Artifacts (Deb)
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getlinuxfilename.outputs.debName }}
path: ${{ steps.getlinuxfilename.outputs.debPath }}
- name: Archive Linux Build Artifacts (RPM)
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getlinuxfilename.outputs.rpmName }}
path: ${{ steps.getlinuxfilename.outputs.rpmPath }}
ci_windows:
runs-on: windows-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Test
run: yarn run test
- name: Getting Build Icon
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
run: |
Copy-Item .\build\canary.ico .\build\icon.ico
Copy-Item .\build\canary.icns .\build\icon.icns
- name: Build
run: yarn run dist --publish=never
env:
CI: true
- name: Get Windows Artifact Names
id: getwindowsfilename
run: |
Write-Host "::set-output name=exeName::$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String exe)"
Write-Host "::set-output name=exePath::dist/squirrel-windows/$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String exe)"
Write-Host "::set-output name=nupkgName::$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String nupkg)"
Write-Host "::set-output name=nupkgPath::dist/squirrel-windows/$(Get-ChildItem -Name .\dist\squirrel-windows\ | Select-String nupkg)"
- name: Archive Windows Build Artifacts (exe)
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getwindowsfilename.outputs.exeName }}
path: ${{ steps.getwindowsfilename.outputs.exePath }}
- name: Archive Windows Build Artifacts (nupkg)
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getwindowsfilename.outputs.nupkgName }}
path: ${{ steps.getwindowsfilename.outputs.nupkgPath }}