Update release.yml
This commit is contained in:
恍兮惚兮 2024-04-26 19:20:31 +08:00
parent 72b0180853
commit 2a86a39f1d
2 changed files with 38 additions and 46 deletions

View File

@ -24,8 +24,6 @@ jobs:
python-version: '3.11'
architecture: x64
- name: Install vcltl
run: python build.py 0
- name: Run build script 32xp
run: python build.py xp
@ -34,18 +32,20 @@ jobs:
- name: Upload English xp artifact
uses: actions/upload-artifact@v4
with:
name: Release_English_xp.zip
name: Release_English_xp
path: builds/Release_English_xp.zip
- name: Upload Chinese xp artifact
uses: actions/upload-artifact@v4
with:
name: Release_Chinese_xp.zip
name: Release_Chinese_xp
path: builds/Release_Chinese_xp.zip
- name: Release LunaHook
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.create_release }}
files: builds/${{ matrix.target }}
files: |
builds/Release_Chinese_xp.zip
builds/Release_English_xp.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_plugin:
@ -55,10 +55,10 @@ jobs:
include:
- cmd: plg32
qtarch: win32_msvc2019
target: plugin32.zip
target: plugin32
- cmd: plg64
qtarch: win64_msvc2019_64
target: plugin64.zip
target: plugin64
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -76,8 +76,6 @@ jobs:
arch: ${{ matrix.qtarch }}
dir: ${{ runner.temp }}
setup-python: true
- name: Install vcltl
run: python build.py 0
- name: Run build script
run: python build.py ${{ matrix.cmd }}
@ -87,12 +85,12 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: builds/${{ matrix.target }}
path: builds/${{ matrix.target }}.zip
- name: Release LunaHook
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.create_release }}
files: builds/${{ matrix.target }}
files: builds/${{ matrix.target }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_everylang:
@ -101,9 +99,9 @@ jobs:
matrix:
include:
- lang: en
target: Release_English.zip
target: Release_English
- lang: zh
target: Release_Chinese.zip
target: Release_Chinese
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -116,8 +114,6 @@ jobs:
with:
python-version: '3.11'
architecture: x64
- name: Install vcltl
run: python build.py 0
- name: Run build script
run: python build.py ${{ matrix.lang }}
@ -128,12 +124,12 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: builds/${{ matrix.target }}
path: builds/${{ matrix.target }}.zip
- name: Release LunaHook
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.create_release }}
files: builds/${{ matrix.target }}
files: builds/${{ matrix.target }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,38 +3,34 @@ import subprocess
rootDir = os.path.dirname(__file__)
if sys.argv[1]=='0':
vcltlFile = "https://github.com/Chuyu-Team/VC-LTL5/releases/download/v5.0.9/VC-LTL-5.0.9-Binary.7z"
vcltlFileName = "VC-LTL-5.0.9-Binary.7z"
vcltlFile = "https://github.com/Chuyu-Team/VC-LTL5/releases/download/v5.0.9/VC-LTL-5.0.9-Binary.7z"
vcltlFileName = "VC-LTL-5.0.9-Binary.7z"
def installVCLTL():
os.chdir(rootDir)
if os.path.exists("temp"):
return # already installed
os.makedirs(rootDir + "\\temp", exist_ok=True)
subprocess.run(f"curl -Lo temp\\{vcltlFileName} {vcltlFile}")
subprocess.run(f"7z x temp\\{vcltlFileName} -otemp\\VC-LTL5")
subprocess.run("cmd /c temp\\VC-LTL5\\Install.cmd")
def installVCLTL():
os.chdir(rootDir)
if os.path.exists("temp"):
return # already installed
os.makedirs(rootDir + "\\temp", exist_ok=True)
subprocess.run(f"curl -Lo temp\\{vcltlFileName} {vcltlFile}")
subprocess.run(f"7z x temp\\{vcltlFileName} -otemp\\VC-LTL5")
subprocess.run("cmd /c temp\\VC-LTL5\\Install.cmd")
installVCLTL()
elif sys.argv[1]=='plg32':
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"cmd /c buildplugin32.bat")
elif sys.argv[1]=='plg64':
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"cmd /c buildplugin64.bat")
elif sys.argv[1]=='pack':
if sys.argv[1]=='pack':
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"python pack.py pack")
elif sys.argv[1]=='en':
else:
installVCLTL()
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"cmd /c builden.bat")
elif sys.argv[1]=='zh':
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"cmd /c buildzh.bat")
elif sys.argv[1]=='xp':
os.chdir(os.path.join(rootDir, "scripts"))
os.system(f"cmd /c build32xp.bat")
if sys.argv[1]=='plg32':
os.system(f"cmd /c buildplugin32.bat")
elif sys.argv[1]=='plg64':
os.system(f"cmd /c buildplugin64.bat")
elif sys.argv[1]=='en':
os.system(f"cmd /c builden.bat")
elif sys.argv[1]=='zh':
os.system(f"cmd /c buildzh.bat")
elif sys.argv[1]=='xp':
os.system(f"cmd /c build32xp.bat")