-
Notifications
You must be signed in to change notification settings - Fork 8
142 lines (123 loc) · 4.65 KB
/
Copy pathbuild.yml
File metadata and controls
142 lines (123 loc) · 4.65 KB
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
name: Build Workflow
on:
pull_request:
types: [closed]
jobs:
build_matrix:
strategy:
matrix:
os: [windows-latest, macos-15-intel]
if: github.event.pull_request.merged == true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
wget https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg
sudo installer -verbose -pkg ./python-3.10.6-macos11.pkg -target /
echo "/Library/Frameworks/Python.framework/Versions/3.10/bin" >> $GITHUB_PATH
- name: Install Python (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/setup-python@v2
with:
python-version: '3.10'
architecture: 'x64'
- name: Install Requirements (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
pip3 install -r requirements.txt
- name: Install Requirements (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
pip install -r requirements.txt
- name: Run PyInstaller (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
pyinstaller PySN.py -w --onefile
- name: Run PyInstaller (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
pyinstaller PySN.py -w --add-data "AphIcon.ico;." --icon="AphIcon.ico"
- name: Move and Zip (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
run: |
mkdir macos
cp dist/PySN macos
(cd macos/ && zip -r -X ../PySN_MacOS.zip .)
- name: Move and Zip (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
mkdir windows
cp -r dist/* windows
Compress-Archive -Path "windows/*" -DestinationPath PySN_Windows.zip
- name: Upload Artifact (MacOS)
if: ${{ matrix.os == 'macos-15-intel' }}
uses: actions/upload-artifact@v4
with:
name: PySN_MacOS.zip
path: PySN_MacOS.zip
- name: Upload Artifact (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: PySN_Windows.zip
path: PySN_Windows.zip
create_release:
needs: build_matrix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: PySN_MacOS.zip
path: ./artifacts
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: PySN_Windows.zip
path: ./artifacts
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v2.5.0
release_name: v2.5.0
body: |
Largest refactor of PySN to date.
- Major speed improvements, particularly when searching for firmware or parsing games.yml.
- Fetch FW locales concurrently.
- Parse games.yml concurrently (results in updates being listed out of order, but is ~10x faster).
- Use session objects and connection pooling for all requests.
- Massive cleanup to codebase.
- Removed redundant requests and function calls.
- Reorganized code into more logical classes and functions.
- Perform tasks on the proper threads.
- Reduce UI spam during downloads.
- Handle some invisible errors when downloading all from games.yml or searching while still downloading.
- Limit simultaneous downloads to 12 to prevent thrashing drives. I'm happy to increase this if requested.
draft: false
prerelease: false
- name: Upload Release Asset (Windows)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/PySN_Windows.zip
asset_name: PySN_Windows.zip
asset_content_type: application/zip
- name: Upload Release Asset (MacOS)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/PySN_MacOS.zip
asset_name: PySN_MacOS.zip
asset_content_type: application/zip