-
Notifications
You must be signed in to change notification settings - Fork 10
144 lines (118 loc) · 4.52 KB
/
build.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
name: Build
on:
workflow_dispatch:
release:
types: [ published ]
env:
PYTHON_VERSION: 3.10.11
jobs:
windows_x64:
name: Windows x64
runs-on: ubuntu-latest
env:
TARGET: windows-x64
steps:
- name: Create folder ${{ env.TARGET }}
run: |
sudo mkdir /${{ env.TARGET }}
sudo chmod 777 /${{ env.TARGET }}
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install zip
run: sudo apt-get install zip
- name: Install unzip
run: sudo apt-get install unzip
- name: Copy git repo folder to ${{ env.TARGET }}
run: cp -r . /${{ env.TARGET }}/sd-webui-prompt-all-in-one-app
- name: Download Python (Windows embeddable package (64-bit))
run: |
wget https://www.python.org/ftp/python/${{ env.PYTHON_VERSION }}/python-${{ env.PYTHON_VERSION }}-embed-amd64.zip
unzip python-3.10.11-embed-amd64.zip -d python-${{ env.PYTHON_VERSION }}-embed-amd64
rm python-3.10.11-embed-amd64.zip
working-directory: /${{ env.TARGET }}
- name: Download startup-windows.bat
run: |
wget https://raw.githubusercontent.com/Physton/sd-webui-prompt-all-in-one-assets/main/app/startup-windows-amd64.bat
mv startup-windows-amd64.bat startup-windows.bat
working-directory: /${{ env.TARGET }}
- name: Download pip
run: |
wget https://bootstrap.pypa.io/get-pip.py
working-directory: /${{ env.TARGET }}/python-${{ env.PYTHON_VERSION }}-embed-amd64
- name: Zip ${{ env.TARGET }}
run: |
zip -r ${{ env.TARGET }}.zip .
working-directory: /${{ env.TARGET }}
- name: Get latest release
id: latest_release
uses: kaliber5/action-get-release@v1
with:
token: ${{ secrets.token }}
latest: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.latest_release.outputs.upload_url }}
asset_path: /${{ env.TARGET }}/${{ env.TARGET }}.zip
asset_name: sd-webui-prompt-all-in-one-app.${{ env.TARGET }}.zip
asset_content_type: application/zip
windows_x86:
name: Windows x86
runs-on: ubuntu-latest
env:
TARGET: windows-x86
steps:
- name: Create folder ${{ env.TARGET }}
run: |
sudo mkdir /${{ env.TARGET }}
sudo chmod 777 /${{ env.TARGET }}
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install zip
run: sudo apt-get install zip
- name: Install unzip
run: sudo apt-get install unzip
- name: Copy git repo folder to ${{ env.TARGET }}
run: cp -r . /${{ env.TARGET }}/sd-webui-prompt-all-in-one-app
- name: Download Python (Windows embeddable package (32-bit))
run: |
wget https://www.python.org/ftp/python/${{ env.PYTHON_VERSION }}/python-${{ env.PYTHON_VERSION }}-embed-win32.zip
unzip python-3.10.11-embed-win32.zip -d python-${{ env.PYTHON_VERSION }}-embed-win32
rm python-3.10.11-embed-win32.zip
working-directory: /${{ env.TARGET }}
- name: Download startup-windows.bat
run: |
wget https://raw.githubusercontent.com/Physton/sd-webui-prompt-all-in-one-assets/main/app/startup-windows-win32.bat
mv startup-windows-win32.bat startup-windows.bat
working-directory: /${{ env.TARGET }}
- name: Download pip
run: |
wget https://bootstrap.pypa.io/get-pip.py
working-directory: /${{ env.TARGET }}/python-${{ env.PYTHON_VERSION }}-embed-win32
- name: Zip ${{ env.TARGET }}
run: |
zip -r ${{ env.TARGET }}.zip .
working-directory: /${{ env.TARGET }}
- name: Get latest release
id: latest_release
uses: kaliber5/action-get-release@v1
with:
token: ${{ secrets.token }}
latest: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.latest_release.outputs.upload_url }}
asset_path: /${{ env.TARGET }}/${{ env.TARGET }}.zip
asset_name: sd-webui-prompt-all-in-one-app.${{ env.TARGET }}.zip
asset_content_type: application/zip