精简步骤

This commit is contained in:
DLmaster
2024-09-06 19:06:38 +08:00
parent a4aa562db9
commit 0c287577ca
2 changed files with 35 additions and 24 deletions

View File

@@ -1,4 +1,22 @@
# 依照 MIT 协议,在此注明:本段代码改写自 BtbN/FFmpeg-Builds # <AUTO_MAA:A MAA Multi Account Management and Automation Tool>
# Copyright © <2024> <DLmaster361>
# 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 <https://www.gnu.org/licenses/>.
# DLmaster_361@163.com
name: Build AUTO_MAA name: Build AUTO_MAA
@@ -29,9 +47,10 @@ jobs:
build_AUTO_MAA: build_AUTO_MAA:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12 - name: Set up Python 3.12
uses: actions/setup-python@v3 uses: actions/setup-python@v5
with: with:
python-version: "3.12" python-version: "3.12"
- name: Install dependencies - name: Install dependencies
@@ -48,14 +67,10 @@ jobs:
- name: Built with pyinstaller - name: Built with pyinstaller
run: | run: |
pyinstaller -F --version-file res/info.txt -w --icon=res/AUTO_MAA.ico AUTO_MAA.py 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 - name: Upload Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: AUTO_MAA_${{ steps.extract_version_number.outputs.version_number }} name: AUTO_MAA_$(head -n 1 更新说明.txt)
path: | path: |
data/**/* data/**/*
gui/**/* gui/**/*
@@ -73,14 +88,6 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 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 - name: Download artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
@@ -92,9 +99,9 @@ jobs:
run: | run: |
set -xe set -xe
shopt -s nullglob shopt -s nullglob
NAME="${{ steps.extract_version_number.outputs.version_number }}" NAME="$(head -n 1 更新说明.txt)"
TAGNAME="${{ steps.extract_version_number.outputs.version_number }}" TAGNAME="$(head -n 1 更新说明.txt)"
CONTENT="${{ steps.read_release_content.outputs.release_content }}" 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} gh release create "$TAGNAME" --target "main" --title "$NAME" --description "$CONTENT" --artifact artifacts/*.{zip,tar.xz}
env: env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

View File

@@ -1,5 +1,9 @@
项目初始阶段,不会提供专门的版本更新程序,您需要手动更新程序。 v3.1.2
v2.1.5及以前的用户,由于新版本采用全新的架构,您需要手动输入之前的信息。 ## 修复BUG
v3.0_Beta版用户直接用AUTO_MAA.exe替代gui.exe后将原文件夹下的gui文件夹用新版本对应文件替换重新设置每个用户的“自定义基建”选项输入“-”以关闭该功能,输入自定义基建配置文件地址以开启该功能)。 - 更新MAA的配置方法使之适配最新版本
v3.1~v3.1.1版用户将原文件夹下的AUTO_MAA.exe文件和gui文件夹用新版本对应文件替换即可。 ## 更新说明
新用户请忽略本说明 - 项目初始阶段,不会提供专门的版本更新程序,您需要手动更新程序
- v2.1.5及以前的用户,由于新版本采用全新的架构,您需要手动输入之前的信息。
- v3.0_Beta版用户直接用AUTO_MAA.exe替代gui.exe后将原文件夹下的gui文件夹用新版本对应文件替换重新设置每个用户的“自定义基建”选项输入“-”以关闭该功能,输入自定义基建配置文件地址以开启该功能)。
- v3.1~v3.1.1版用户将原文件夹下的AUTO_MAA.exe文件和gui文件夹用新版本对应文件替换即可。
- 新用户请忽略本说明。