优化自动化打包流程显示
This commit is contained in:
28
.github/workflows/python-app.yml
vendored
28
.github/workflows/python-app.yml
vendored
@@ -77,9 +77,9 @@ jobs:
|
|||||||
- name: Read version
|
- name: Read version
|
||||||
id: read_version
|
id: read_version
|
||||||
run: |
|
run: |
|
||||||
$MAIN_VERSION=(Get-Content -Path "update_info.txt" -TotalCount 1).Trim()
|
$MAIN_VERSION=(Get-Content -Path "version_info.txt" -TotalCount 1).Trim()
|
||||||
"AUTO_MAA_version=$MAIN_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
"AUTO_MAA_version=$MAIN_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||||
$UPDATER_VERSION=(Get-Content -Path "update_info.txt" -TotalCount 2 | Select-Object -Index 1).Trim()
|
$UPDATER_VERSION=(Get-Content -Path "version_info.txt" -TotalCount 2 | Select-Object -Index 1).Trim()
|
||||||
"updater_version=$UPDATER_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
"updater_version=$UPDATER_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||||
- name: Create Zip
|
- name: Create Zip
|
||||||
id: create_zip
|
id: create_zip
|
||||||
@@ -93,11 +93,11 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
AUTO_MAA_${{ env.AUTO_MAA_version }}.zip
|
AUTO_MAA_${{ env.AUTO_MAA_version }}.zip
|
||||||
Updater_${{ env.updater_version }}.zip
|
Updater_${{ env.updater_version }}.zip
|
||||||
- name: Upload Update_Info Artifact
|
- name: Upload Version_Info Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: update_info
|
name: version_info
|
||||||
path: update_info.txt
|
path: version_info.txt
|
||||||
publish_release:
|
publish_release:
|
||||||
name: Publish release
|
name: Publish release
|
||||||
needs: build_AUTO_MAA
|
needs: build_AUTO_MAA
|
||||||
@@ -111,15 +111,15 @@ jobs:
|
|||||||
pattern: AUTO_MAA_*
|
pattern: AUTO_MAA_*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: artifacts
|
path: artifacts
|
||||||
- name: Download Update_Info
|
- name: Download Version_Info
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: update_info
|
name: version_info
|
||||||
path: ./
|
path: ./
|
||||||
- name: Check if release exists
|
- name: Check if release exists
|
||||||
id: check_if_release_exists
|
id: check_if_release_exists
|
||||||
run: |
|
run: |
|
||||||
release_id=$(gh release view $(sed 's/\r$//g' <(head -n 1 update_info.txt)) --json id --jq .id || true)
|
release_id=$(gh release view $(sed 's/\r$//g' <(head -n 1 version_info.txt)) --json id --jq .id || true)
|
||||||
if [[ -z $release_id ]]; then
|
if [[ -z $release_id ]]; then
|
||||||
echo "release_exists=false" >> $GITHUB_OUTPUT
|
echo "release_exists=false" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
@@ -133,9 +133,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -xe
|
set -xe
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
NAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
NAME="$(sed 's/\r$//g' <(head -n 1 version_info.txt))"
|
||||||
TAGNAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
TAGNAME="$(sed 's/\r$//g' <(head -n 1 version_info.txt))"
|
||||||
NOTES_MAIN="$(sed 's/\r$//g' <(tail -n +3 update_info.txt))"
|
NOTES_MAIN="$(sed 's/\r$//g' <(tail -n +3 version_info.txt))"
|
||||||
NOTES_TAIL="\`\`\`本release通过GitHub Actions自动构建\`\`\`"
|
NOTES_TAIL="\`\`\`本release通过GitHub Actions自动构建\`\`\`"
|
||||||
NOTES="$NOTES_MAIN<br><br>$NOTES_TAIL"
|
NOTES="$NOTES_MAIN<br><br>$NOTES_TAIL"
|
||||||
gh release create "$TAGNAME" --target "main" --title "$NAME" --notes "$NOTES" artifacts/*
|
gh release create "$TAGNAME" --target "main" --title "$NAME" --notes "$NOTES" artifacts/*
|
||||||
@@ -147,9 +147,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -xe
|
set -xe
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
NAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
NAME="$(sed 's/\r$//g' <(head -n 1 version_info.txt))"
|
||||||
TAGNAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
TAGNAME="$(sed 's/\r$//g' <(head -n 1 version_info.txt))"
|
||||||
NOTES_MAIN="$(sed 's/\r$//g' <(tail -n +3 update_info.txt))"
|
NOTES_MAIN="$(sed 's/\r$//g' <(tail -n +3 version_info.txt))"
|
||||||
NOTES_TAIL="\`\`\`本release通过GitHub Actions自动构建\`\`\`"
|
NOTES_TAIL="\`\`\`本release通过GitHub Actions自动构建\`\`\`"
|
||||||
NOTES="$NOTES_MAIN<br><br>$NOTES_TAIL"
|
NOTES="$NOTES_MAIN<br><br>$NOTES_TAIL"
|
||||||
gh release delete "$TAGNAME" --yes
|
gh release delete "$TAGNAME" --yes
|
||||||
|
|||||||
@@ -52,9 +52,8 @@ if __name__ == "__main__":
|
|||||||
f" --product-version={version["main_version"]}"
|
f" --product-version={version["main_version"]}"
|
||||||
f" --file-description='AUTO_MAA Component'"
|
f" --file-description='AUTO_MAA Component'"
|
||||||
f" --copyright='Copyright © 2024 DLmaster361'"
|
f" --copyright='Copyright © 2024 DLmaster361'"
|
||||||
f" --assume-yes-for-downloads --show-progress"
|
f" --assume-yes-for-downloads --output-filename=AUTO_MAA"
|
||||||
f" --output-filename=AUTO_MAA --remove-output"
|
f" --remove-output main.py",
|
||||||
f" main.py",
|
|
||||||
shell=True,
|
shell=True,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
@@ -87,9 +86,8 @@ if __name__ == "__main__":
|
|||||||
f" --product-version={version["updater_version"]}"
|
f" --product-version={version["updater_version"]}"
|
||||||
f" --file-description='AUTO_MAA Component'"
|
f" --file-description='AUTO_MAA Component'"
|
||||||
f" --copyright='Copyright © 2024 DLmaster361'"
|
f" --copyright='Copyright © 2024 DLmaster361'"
|
||||||
f" --assume-yes-for-downloads --show-progress"
|
f" --assume-yes-for-downloads --output-filename=Updater"
|
||||||
f" --output-filename=Updater --remove-output"
|
f" --remove-output Updater.py",
|
||||||
f" Updater.py",
|
|
||||||
shell=True,
|
shell=True,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
text=True,
|
text=True,
|
||||||
@@ -101,7 +99,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
os.remove(os.path.normpath("Updater.py"))
|
os.remove(os.path.normpath("Updater.py"))
|
||||||
|
|
||||||
with open("update_info.txt", "w", encoding="utf-8") as f:
|
with open("version_info.txt", "w", encoding="utf-8") as f:
|
||||||
print(
|
print(
|
||||||
f"{version_text(main_version_numb)}\n{version_text(updater_version_numb)}{version["announcement"]}",
|
f"{version_text(main_version_numb)}\n{version_text(updater_version_numb)}{version["announcement"]}",
|
||||||
file=f,
|
file=f,
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
v4.2.0
|
|
||||||
v1.1.0
|
|
||||||
## 新增功能
|
|
||||||
- 提供完整打包代码
|
|
||||||
## 修复BUG
|
|
||||||
- 同步MAA`v5.11.1`的字段修改
|
|
||||||
- 清除自动化中无效的整合流程
|
|
||||||
## 程序优化
|
|
||||||
- 调整项目结构,模块化各功能组件
|
|
||||||
- 改用`nuitka`编译,压缩软件体积,提升运行速度
|
|
||||||
Reference in New Issue
Block a user