forked from FredrikNoren/ungit
-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (108 loc) · 4.24 KB
/
ci.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
node-version: ['10', '12', '*']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# electron packager (win32 ia32 on macos) https://github.com/electron/electron-packager/pull/449#issuecomment-240508298
WINEDLLOVERRIDES: 'mscoree,mshtml='
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# linux dependencies
- run: sudo apt update
if: matrix.os == 'ubuntu-latest'
- run: sudo apt install -y libgbm1
if: matrix.os == 'ubuntu-latest'
- run: sudo apt install -y wine64
if: matrix.os == 'ubuntu-latest'
- run: wine --version
if: matrix.os == 'ubuntu-latest'
- run: sudo add-apt-repository ppa:git-core/ppa -y && sudo apt-get update -q && sudo apt-get install -y git
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '*'
# macos dependencies
- run: brew update
if: matrix.os == 'macos-latest'
- run: brew cask install xquartz wine-stable
if: matrix.os == 'macos-latest'
- run: wine64 --version
if: matrix.os == 'macos-latest'
- run: brew reinstall git
if: matrix.os == 'macos-latest' && matrix.node-version == '*'
# windows dependencies
# https://github.community/t5/GitHub-Actions/TEMP-is-broken-on-Windows/td-p/30432
- run: echo "::set-env name=TEMP::C:\Users\runneradmin\AppData\Local\Temp"
if: matrix.os == 'windows-latest'
- run: choco upgrade git
if: matrix.os == 'windows-latest' && matrix.node-version == '*'
- run: git --version
- run: git config --global user.email "test@testy.com"
- run: git config --global user.name "Test testy"
- run: npm ci
- run: npm run package
- run: npm test
# publish artifacts
- run: npm run electronpublish
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
- name: Upload ungit-darwin-x64
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-darwin-x64
path: dist/ungit-darwin-x64.zip
- name: Upload ungit-linux-arm64
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-linux-arm64
path: dist/ungit-linux-arm64.zip
- name: Upload ungit-linux-armv7l
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-linux-armv7l
path: dist/ungit-linux-armv7l.zip
- name: Upload ungit-linux-ia32
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-linux-ia32
path: dist/ungit-linux-ia32.zip
- name: Upload ungit-linux-x64
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-linux-x64
path: dist/ungit-linux-x64.zip
- name: Upload ungit-mas-x64
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-mas-x64
path: dist/ungit-mas-x64.zip
- name: Upload ungit-win32-arm64
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-win32-arm64
path: dist/ungit-win32-arm64.zip
- name: Upload ungit-win32-ia32
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-win32-ia32
path: dist/ungit-win32-ia32.zip
- name: Upload ungit-win32-x64
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '10'
uses: actions/upload-artifact@v2
with:
name: ungit-win32-x64
path: dist/ungit-win32-x64.zip