forked from xyzz/womier-flasher
-
Notifications
You must be signed in to change notification settings - Fork 32
91 lines (74 loc) · 2.03 KB
/
main.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
name: CI
on:
push:
branches: [ master ]
jobs:
build-linux:
runs-on: ubuntu-18.04
steps:
- name: Install dependencies
run: sudo apt-get install libusb-1.0-0-dev libudev-dev
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6.x'
- name: Setup venv
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade setuptools
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: |
source venv/bin/activate
fbs freeze
cd target
tar cfJ flasher-linux.tar.xz "Sonix Keyboard Flasher"
- uses: actions/upload-artifact@v1
with:
name: flasher-linux
path: target/flasher-linux.tar.xz
build-mac:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6.x'
- name: Setup venv
run: |
python -m venv venv
source venv/bin/activate
pip install cython
pip install -r requirements.txt
- name: Build
run: |
source venv/bin/activate
fbs freeze
hdiutil create -volname "Sonix Keyboard Flasher" -srcfolder "target/Sonix Keyboard Flasher.app" -ov -format UDZO flasher-mac.dmg
- uses: actions/upload-artifact@v1
with:
name: flasher-mac
path: flasher-mac.dmg
build-win:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6.x'
- name: Setup venv
run: |
python -m venv venv
. .\venv\Scripts\activate.ps1
pip install -r requirements.txt
- name: Build
run: |
. .\venv\Scripts\activate.ps1
fbs freeze
Compress-Archive -Path "target\Sonix Keyboard Flasher" -DestinationPath flasher-win.zip
- uses: actions/upload-artifact@v1
with:
name: flasher-win
path: flasher-win.zip