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

View File

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