-
Notifications
You must be signed in to change notification settings - Fork 26
90 lines (73 loc) · 3.54 KB
/
Full_Build_Upload.yaml
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
name: 'Push Release to Server'
on:
workflow_dispatch:
jobs:
Build-Subsystem-Manager:
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
python: ['3.10']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Update Version Name
run: |
mkdir -p /tmp/artifacts
cp ./other_files/midori_program_ver.txt /tmp/artifacts
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Dependencies (Pyinstaller)
run: |
pip install pyinstaller
- name: Install Dependencies (Requirements.txt)
run: |
pip install -r ./other_files/model_installer/requirements.txt
- name: Build
run: |
pyinstaller --onedir --clean --distpath /tmp/artifacts/${{ matrix.os }}/ --add-data ./other_files/midori_program_ver.txt:. ./other_files/model_installer/subsystem_manager.py
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: subsystem-manager-${{ matrix.os }}
path: /tmp/artifacts/${{ matrix.os }}/*
compression-level: 0
Push-Build-To-Server:
needs: [Build-Subsystem-Manager]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Fetch Artifacts
uses: actions/download-artifact@v4
- name: Install Dependencies
run: |
cp ./other_files/midori_program_ver.txt .
pip install requests cryptography
- name: Linux Artifacts
run: |
tar -cvzf model_installer_linux.tar.gz -C subsystem-manager-ubuntu-20.04/subsystem_manager subsystem_manager _internal
- name: Windows Artifacts
run: |
cd subsystem-manager-windows-latest/subsystem_manager
zip -r ../../model_installer_windows.zip subsystem_manager.exe _internal
cd ../../
- name: Mac Artifacts
run: |
cd subsystem-manager-macos-latest/subsystem_manager
zip -r ../../model_installer_mac.zip subsystem_manager _internal
cd ../../
- name: Download the Uploader
run: |
curl -O https://tea-cup.midori-ai.xyz/download/midori_ai_downloader
chmod +x midori_ai_downloader
./midori_ai_downloader git_uploader.py
- name: Upload Artifacts to Server
run: |
python3.10 git_uploader.py --type Linux --username "${{ secrets.MIDORI_AI_USERNAME }}" --password "${{ secrets.MIDORI_AI_PASSWORD }}" --twoflogin "${{ secrets.MIDORI_AI_TFA }}" --file "model_installer_linux.tar.gz" --filename "model_installer_linux.tar.gz"
python3.10 git_uploader.py --type Windows --username "${{ secrets.MIDORI_AI_USERNAME }}" --password "${{ secrets.MIDORI_AI_PASSWORD }}" --twoflogin "${{ secrets.MIDORI_AI_TFA }}" --file "model_installer_windows.zip" --filename "model_installer_windows.zip"
python3.10 git_uploader.py --type Mac --username "${{ secrets.MIDORI_AI_USERNAME }}" --password "${{ secrets.MIDORI_AI_PASSWORD }}" --twoflogin "${{ secrets.MIDORI_AI_TFA }}" --file "model_installer_mac.zip" --filename "model_installer_mac.zip"
python3.10 git_uploader.py --type Linux --username "${{ secrets.MIDORI_AI_USERNAME }}" --password "${{ secrets.MIDORI_AI_PASSWORD }}" --twoflogin "${{ secrets.MIDORI_AI_TFA }}" --file "midori_program_ver.txt" --filename "midori_program_ver.txt"