-
Notifications
You must be signed in to change notification settings - Fork 26
119 lines (99 loc) · 4.58 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
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
name: 'Push Release to Server'
on:
workflow_dispatch:
jobs:
Git-Subsystem-Manager:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Update Git Version
run: |
mkdir -p /tmp/artifacts
mkdir -p /tmp/artifacts/subsystem_manager
cp -r ./Subsystem-Manager/subsystem-manager-uv/* /tmp/artifacts/subsystem_manager
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: subsystem-manager-github-latest
path: /tmp/artifacts/*
compression-level: 0
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
with:
submodules: recursive
- name: Update Version Name
run: |
mkdir -p /tmp/artifacts
cp ./Subsystem-Manager/subsystem-manager-uv/midori_program_ver.txt /tmp/artifacts
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Dependencies (UV)
run: |
pip install uv
- name: Build
run: |
cd Subsystem-Manager/subsystem-manager-uv
uv run pyinstaller --onedir --clean --distpath /tmp/artifacts/${{ matrix.os }}/ --add-data midori_program_ver.txt:. subsystem_manager.py
cd ../..
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: subsystem-manager-${{ matrix.os }}
path: /tmp/artifacts/${{ matrix.os }}/*
compression-level: 9
Push-Build-To-Server:
needs: [Build-Subsystem-Manager, Git-Subsystem-Manager]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- 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 ./Subsystem-Manager/subsystem-manager-uv/midori_program_ver.txt .
pip install requests cryptography
- name: Linux Artifacts
run: |
tar -cvvvzf 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: Github Artifacts
run: |
cd subsystem-manager-github-latest/subsystem_manager
zip -r ../../subsystem_manager_git.zip *
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 "subsystem_manager_git.zip" --filename "subsystem_manager_git.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"