From 0c287577ca3819cc993fcf2fa8d8c7b9c9eead72 Mon Sep 17 00:00:00 2001 From: DLmaster Date: Fri, 6 Sep 2024 19:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-app.yml | 45 ++++++++++++++++++-------------- 更新说明.txt | 14 ++++++---- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 63832ed..722c302 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,4 +1,22 @@ -# 依照 MIT 协议,在此注明:本段代码改写自 BtbN/FFmpeg-Builds +# +# Copyright © <2024> + +# This file is part of AUTO_MAA. + +# AUTO_MAA is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. + +# AUTO_MAA is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +# the GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with AUTO_MAA. If not, see . + +# DLmaster_361@163.com name: Build AUTO_MAA @@ -29,9 +47,10 @@ jobs: build_AUTO_MAA: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Python 3.12 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install dependencies @@ -48,14 +67,10 @@ jobs: - name: Built with pyinstaller run: | pyinstaller -F --version-file res/info.txt -w --icon=res/AUTO_MAA.ico AUTO_MAA.py - - name: Extract version number - id: extract_version_number - run: | - python -c "import re; content = open('res/info.txt', 'r', encoding='utf-8').read(); match = re.search(r\\\"StringStruct(\\'ProductVersion\\', \\'(.*?)\\')\\\", content);\\nif match:\\n\\tversion_number = match.group(1);print(f'::set-output name=version_number::{version_number}')" - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: AUTO_MAA_${{ steps.extract_version_number.outputs.version_number }} + name: AUTO_MAA_$(head -n 1 更新说明.txt) path: | data/**/* gui/**/* @@ -73,14 +88,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Extract version number - id: extract_version_number - run: | - python -c "import re; content = open('res/info.txt', 'r', encoding='utf-8').read(); match = re.search(r\\\"StringStruct(\\'ProductVersion\\', \\'(.*?)\\')\\\", content);\\nif match:\\n\\tversion_number = match.group(1);print(f'::set-output name=version_number::{version_number}')" - - name: Read release content - id: read_release_content - run: | - python -c "with open('更新说明.txt', 'r', encoding='utf-8') as f:\n\trelease_content = f.read(); print(f'::set-output name=release_content::{release_content}')" - name: Download artifacts uses: actions/download-artifact@v4 with: @@ -92,9 +99,9 @@ jobs: run: | set -xe shopt -s nullglob - NAME="${{ steps.extract_version_number.outputs.version_number }}" - TAGNAME="${{ steps.extract_version_number.outputs.version_number }}" - CONTENT="${{ steps.read_release_content.outputs.release_content }}" + NAME="$(head -n 1 更新说明.txt)" + TAGNAME="$(head -n 1 更新说明.txt)" + CONTENT="$(tail -n +2 更新说明.txt)\n\n```本release通过GitHub Actions自动构建```" gh release create "$TAGNAME" --target "main" --title "$NAME" --description "$CONTENT" --artifact artifacts/*.{zip,tar.xz} env: GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} \ No newline at end of file diff --git a/更新说明.txt b/更新说明.txt index 3770331..58dbfee 100644 --- a/更新说明.txt +++ b/更新说明.txt @@ -1,5 +1,9 @@ -项目初始阶段,不会提供专门的版本更新程序,您需要手动更新程序。 -v2.1.5及以前的用户,由于新版本采用全新的架构,您需要手动输入之前的信息。 -v3.0_Beta版用户,直接用AUTO_MAA.exe替代gui.exe后,将原文件夹下的gui文件夹用新版本对应文件替换,重新设置每个用户的“自定义基建”选项(输入“-”以关闭该功能,输入自定义基建配置文件地址以开启该功能)。 -v3.1~v3.1.1版用户,将原文件夹下的AUTO_MAA.exe文件和gui文件夹用新版本对应文件替换即可。 -新用户请忽略本说明。 \ No newline at end of file +v3.1.2 +## 修复BUG +- 更新MAA的配置方法,使之适配最新版本 +## 更新说明 +- 项目初始阶段,不会提供专门的版本更新程序,您需要手动更新程序。 +- v2.1.5及以前的用户,由于新版本采用全新的架构,您需要手动输入之前的信息。 +- v3.0_Beta版用户,直接用AUTO_MAA.exe替代gui.exe后,将原文件夹下的gui文件夹用新版本对应文件替换,重新设置每个用户的“自定义基建”选项(输入“-”以关闭该功能,输入自定义基建配置文件地址以开启该功能)。 +- v3.1~v3.1.1版用户,将原文件夹下的AUTO_MAA.exe文件和gui文件夹用新版本对应文件替换即可。 +- 新用户请忽略本说明。 \ No newline at end of file