-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fb7f33
commit 24e826a
Showing
2 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,75 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python application | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
pip install -r requirements.txt | ||
pip install pyinstaller | ||
- name: Build with PyInstaller | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
pyinstaller wifi_hotspot.spec | ||
- name: Create Release ZIP | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
pytest | ||
cd dist | ||
7z a -tzip LiteWifi.zip "WiFi热点管理工具.exe" | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: dist/LiteWifi.zip | ||
name: LiteWifi ${{ github.ref_name }} | ||
body: | | ||
## LiteWifi ${{ github.ref_name }} | ||
### 更新内容 | ||
- 自动构建发布 | ||
### 使用说明 | ||
1. 下载 LiteWifi.zip | ||
2. 解压后以管理员身份运行 WiFi热点管理工具.exe | ||
### 注意事项 | ||
- 需要管理员权限 | ||
- 需要支持热点功能的网卡 | ||
- Windows 10/11 系统 | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload Build Artifact | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: LiteWifi | ||
path: dist/WiFi热点管理工具.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
altgraph==0.17.4 | ||
packaging==24.2 | ||
pefile==2023.2.7 | ||
pyinstaller==6.11.1 | ||
pyinstaller-hooks-contrib==2024.10 | ||
PyQt6==6.7.1 | ||
PyQt6-Qt6==6.7.3 | ||
PyQt6_sip==13.8.0 | ||
pywin32==308 | ||
pywin32-ctypes==0.2.3 | ||
setuptools==75.5.0 |