-
Notifications
You must be signed in to change notification settings - Fork 2k
166 lines (145 loc) · 6.06 KB
/
test-and-upload.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: "Test And Upload"
on:
push:
branches:
- master
jobs:
test-and-upload:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [
windows,
ubuntu,
macos
]
node: [
16,
17
]
steps:
- name: "Checkout"
uses: actions/[email protected]
- name: "Setup Node.js environment"
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/
- name: "Get package info"
id: package-info
uses: luizfelipelaviola/get-package-info@v1
with:
path: ./packages/mitmproxy
- name: "Print"
run: |
echo "version = ${{ steps.package-info.outputs.version }}";
echo "github.ref_type = ${{ github.ref_type }}";
echo "github.ref = ${{ github.ref }}";
echo "github.ref_name = ${{ github.ref_name }}";
- name: "npm install -g lerna@6/yarn"
run: |
echo "======================================================================";
echo "npm install -g lerna@6";
echo "--------------------";
npm install -g lerna@6;
echo "======================================================================";
echo "npm install -g yarn";
echo "--------------------";
npm install -g yarn;
- name: "npm -v | yarn -v | lerna -v"
run: |
echo "======================================================================";
echo "npm -v";
echo "--------------------";
npm -v;
echo "======================================================================";
echo "yarn -v";
echo "--------------------";
yarn -v;
echo "======================================================================";
echo "lerna -v";
echo "--------------------";
lerna -v;
- name: "lerna bootstrap"
run: |
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "lerna bootstrap --npm-client=yarn";
echo "--------------------";
lerna bootstrap --npm-client=yarn;
- name: "npm run electron:build for node16"
if: ${{ matrix.node == '16' }}
run: |
echo "======================================================================";
echo "cd packages/gui";
echo "--------------------";
cd packages/gui;
dir || ls -lah;
echo "======================================================================";
echo "npm run electron:build";
echo "--------------------";
npm run electron:build;
echo "======================================================================";
echo "cd dist_electron";
echo "--------------------";
cd dist_electron;
dir || ls -lah;
echo "======================================================================";
echo "cd ../../../";
echo "--------------------";
cd ../../../;
dir || ls -lah;
- name: "npm run electron:build for node17"
if: ${{ matrix.node != '16' }}
env:
NODE_OPTIONS: --openssl-legacy-provider
run: |
echo "======================================================================";
echo "cd packages/gui";
echo "--------------------";
cd packages/gui;
dir || ls -lah;
echo "======================================================================";
echo "npm run electron:build";
echo "--------------------";
npm run electron:build;
echo "======================================================================";
echo "cd dist_electron";
echo "--------------------";
cd dist_electron;
dir || ls -lah;
echo "======================================================================";
echo "cd ../../../";
echo "--------------------";
cd ../../../;
dir || ls -lah;
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.exe - Windows"
uses: actions/[email protected]
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.exe
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.exe"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.deb - Ubuntu"
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.deb
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.deb"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.AppImage - Ubuntu"
uses: actions/[email protected]
if: ${{ matrix.os == 'ubuntu' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.AppImage
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.AppImage"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.dmg - Mac"
uses: actions/[email protected]
if: ${{ matrix.os == 'macos' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}.dmg
name: "DevSidecar-${{ steps.package-info.outputs.version }}-node${{ matrix.node }}.dmg"
if-no-files-found: error