-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (114 loc) · 3.94 KB
/
deploy.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
name: deploy
on:
push:
branches:
- production
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install dependencies
run: |
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
sudo apt-get install libsdl2-2.0-0
python -m pip install --upgrade pip setuptools wheel
python -m pip install PyInstaller==4.4
python -m pip install PyYAML
python -m pip install requests
python -m pip install packaging
python -m pip install appdirs
python -m pip install "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/wxPython-4.1.1-cp38-cp38-linux_x86_64.whl"
- name: Compile using pyinstaller
run: |
pyinstaller ./dist/rva_points_linux.spec -w --onefile --workpath dist/linux/build --distpath ./dist/linux
mv ./dist/linux/rva_points .
- name: Prepare release
uses: papeloto/action-zip@v1
with:
files: rva_points icons
dest: rva_points_linux.zip
recursive: false
- name: Prepare FTP directories
run: |
mv rva_points ./dist/linux
mv rva_points_linux.zip ./dist/linux
rm -r ./dist/linux/build
- name: Deploy via FTP
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ${{ secrets.FTP_SERVER }}
username: rva
password: ${{ secrets.FTP_PASSWORD }}
local-dir: "./dist/linux/"
server-dir: "rva_points/linux/"
win64:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install PyInstaller==4.4
python -m pip install PyYAML
python -m pip install requests
python -m pip install packaging
python -m pip install appdirs
python -m pip install wxPython
- name: Compile using pyinstaller
run: |
pyinstaller ./dist/rva_points_win64.spec -w --onefile --workpath dist/win64/build --distpath ./dist/win64
mv ./dist/win64/rva_points.exe .
- name: Prepare release
uses: papeloto/action-zip@v1
with:
files: rva_points.exe icons
dest: rva_points_win64.zip
recursive: false
- name: Prepare FTP directories
run: |
mv rva_points.exe ./dist/win64
mv rva_points_win64.zip ./dist/win64
rm -r ./dist/win64/build
- name: Deploy via FTP
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ${{ secrets.FTP_SERVER }}
username: rva
password: ${{ secrets.FTP_PASSWORD }}
local-dir: "./dist/win64/"
server-dir: "rva_points/win64/"
version:
needs: [linux, win64]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install dependencies
run: |
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
sudo apt-get install libsdl2-2.0-0
python -m pip install --upgrade pip setuptools wheel
python -m pip install requests
python -m pip install packaging
python -m pip install appdirs
- name: Perpare rva_points.json
run: |
cd dist && python release.py
mkdir version && mv rva_points.json version
- name: Deploy via FTP
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ${{ secrets.FTP_SERVER }}
username: rva
password: ${{ secrets.FTP_PASSWORD }}
local-dir: "./dist/version/"
server-dir: "rva_points/"