-
Notifications
You must be signed in to change notification settings - Fork 259
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
Showing
7 changed files
with
123 additions
and
114 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 |
---|---|---|
|
@@ -53,48 +53,48 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: pip | ||
|
||
- name: Install libraries | ||
if: ${{ matrix.build == 'macos' }} | ||
run: | | ||
# FIX: No package 'gobject-introspection-1.0' found | ||
# https://tutorials.technology/solved_errors/osx-gobject-introspection-1_0-found.html | ||
brew install gobject-introspection | ||
- name: Install dependencies - macOS | ||
if: ${{ matrix.build == 'macos' }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-mac.txt | ||
pip install pyinstaller==5.8.0 | ||
- name: Install dependencies - Windows | ||
if: ${{ matrix.build == 'windows' }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pyinstaller==5.8.0 | ||
- name: Build macOS app - macOS | ||
if: ${{ matrix.build == 'macos' }} | ||
run: | | ||
chmod +x build-macos.sh | ||
./build-macos.sh | ||
# cd dist | ||
ls -al dist | ||
rm dist/MDCx | ||
# `upload-artifact`会使文件丢失可执行权限。解决思路,先把`dist`打包成zip,再上传 | ||
zip -r MDCx.app.zip dist | ||
ls -al | ||
- name: Build Windows app - Windows | ||
if: ${{ matrix.build == 'windows' }} | ||
run: ./build-action | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v2 | ||
# with: | ||
# python-version: ${{ env.PYTHON_VERSION }} | ||
# cache: pip | ||
# | ||
# - name: Install libraries | ||
# if: ${{ matrix.build == 'macos' }} | ||
# run: | | ||
# # FIX: No package 'gobject-introspection-1.0' found | ||
# # https://tutorials.technology/solved_errors/osx-gobject-introspection-1_0-found.html | ||
# brew install gobject-introspection | ||
# | ||
# - name: Install dependencies - macOS | ||
# if: ${{ matrix.build == 'macos' }} | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install -r requirements-mac.txt | ||
# pip install pyinstaller==5.8.0 | ||
# | ||
# - name: Install dependencies - Windows | ||
# if: ${{ matrix.build == 'windows' }} | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install -r requirements.txt | ||
# pip install pyinstaller==5.8.0 | ||
# | ||
# - name: Build macOS app - macOS | ||
# if: ${{ matrix.build == 'macos' }} | ||
# run: | | ||
# chmod +x build-macos.sh | ||
# ./build-macos.sh | ||
# # cd dist | ||
# ls -al dist | ||
# rm dist/MDCx | ||
# # `upload-artifact`会使文件丢失可执行权限。解决思路,先把`dist`打包成zip,再上传 | ||
# zip -r MDCx.app.zip dist | ||
# ls -al | ||
# | ||
# - name: Build Windows app - Windows | ||
# if: ${{ matrix.build == 'windows' }} | ||
# run: ./build-action | ||
|
||
# - name: Upload artifact - macOS | ||
# uses: actions/upload-artifact@v3 | ||
|
@@ -112,18 +112,30 @@ jobs: | |
# path: | | ||
# .\MDCx | ||
|
||
|
||
- name: Get changelog | ||
id: get-changelog | ||
if: ${{ matrix.build == 'macos' }} | ||
run: | | ||
log=$(cat changelog.md) | ||
echo "CHANGELOG=$log" >> $GITHUB_ENV | ||
- name: Create Release - macOS | ||
uses: svenstaro/[email protected] | ||
if: ${{ matrix.build == 'macos' }} | ||
with: | ||
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}.app.zip | ||
file: MDCx.app.zip | ||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-') }} | ||
asset_name: macos.sh | ||
file: build-macos.sh | ||
prerelease: true | ||
body: | | ||
${{ steps.get-changelog.outputs.CHANGELOG }} | ||
- name: Create Release - Windows | ||
uses: svenstaro/[email protected] | ||
if: ${{ matrix.build == 'windows' }} | ||
with: | ||
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}.exe | ||
file: dist/MDCx.exe | ||
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-') }} | ||
asset_name: windows.ps1 | ||
file: build-action.ps1 | ||
prerelease: true | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
time=$(date +"%Y-%m-%d_%H-%M-%S") | ||
|
||
FileName="MDCx-$time.exe" | ||
echo "Output File: $FileName" | ||
|
||
pyi-makespec -n "$FileName" -F \ | ||
-i resources/Img/MDCx.ico \ | ||
-w main.py \ | ||
-p "./src" \ | ||
--add-data "resources;resources" \ | ||
--add-data "libs;." \ | ||
--hidden-import socks \ | ||
--hidden-import urllib3 \ | ||
--hidden-import _cffi_backend \ | ||
--collect-all curl_cffi | ||
|
||
rm -rf dist | ||
|
||
pyinstaller "$FileName.spec" | ||
|
||
rm -rf build | ||
rm -f "$FileName.spec" | ||
|
||
echo 'Done' |
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,24 @@ | ||
## 新增 | ||
* test generate changelog | ||
## 修复 | ||
* None | ||
|
||
<details> | ||
<summary>Full Changelog</summary> | ||
|
||
b6b8e86 Ver 120240119 | ||
90b0b06 Fix: 识别 GETCHU-XXXX (#46) | ||
4fba1ba Fix: update config after save (#38) | ||
775c060 CI: build for tags | ||
8a0dea5 CI: macos build | ||
f84f2c6 Merge pull request #48 from northsea4/master | ||
11302a2 Merge branch 'sqzw-x:master' into master | ||
c001cb3 Fix: cant del custom website | ||
f7fc1c6 CI: auto build for release | ||
e432ccd fix release | ||
38cb18f build with github actions | ||
fd2a4be Add: github action build.yml | ||
848f07b Fix: custom url | ||
b6e57d4 Fix: airavcc get url list (#38) | ||
|
||
</details> |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
tags=$(git tag -l '120*' --sort=-v:refname) | ||
last=$(echo "$tags" | sed -n '2p') | ||
commitlog=$(git log --pretty=format:"%h %s" $last..HEAD) | ||
|
||
echo "## 新增 | ||
* | ||
## 修复 | ||
* | ||
<details> | ||
<summary>Full Changelog</summary> | ||
$commitlog | ||
</details>" > changelog.md # use "" to keep \n in $commitlog |