LunaHook-mirror/.github/workflows/release.yml

157 lines
4.5 KiB
YAML
Raw Normal View History

2024-04-26 11:13:32 +08:00
name: Release
on:
workflow_dispatch: # allows manual triggering
inputs:
create_release:
description: 'Create new release'
required: true
type: string
env:
QT_VERSION: 5.15.2
jobs:
2024-04-26 16:45:45 +08:00
build_xp:
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Windows 10 SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 22621
- name: Install Qt32
uses: jurplel/install-qt-action@v3.3.0
with:
version: ${{ env.QT_VERSION }}
host: windows
target: desktop
arch: win32_msvc2019
dir: ${{ runner.temp }}
setup-python: true
- name: Run build script 32xp
run: python build.py 32xp
- name: Pack
run: python build.py pack_xp
# - name: Upload plugin32_xp artifact
# uses: actions/upload-artifact@v4
# with:
# name: plugin32_xp
# path: builds/plugin32_xp.zip
- name: Upload English xp artifact
uses: actions/upload-artifact@v4
with:
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
path: builds/Release_Chinese_xp.zip
2024-04-26 11:13:32 +08:00
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Windows 10 SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 22621
2024-04-26 12:03:24 +08:00
- name: Install Qt32
2024-04-26 11:13:32 +08:00
uses: jurplel/install-qt-action@v3.3.0
with:
version: ${{ env.QT_VERSION }}
host: windows
target: desktop
2024-04-26 12:03:24 +08:00
arch: win32_msvc2019
2024-04-26 11:13:32 +08:00
dir: ${{ runner.temp }}
setup-python: true
2024-04-26 12:03:24 +08:00
- name: Run build script 32
run: python build.py 32
- name: Install Qt
2024-04-26 11:13:32 +08:00
uses: jurplel/install-qt-action@v3.3.0
with:
version: ${{ env.QT_VERSION }}
host: windows
target: desktop
2024-04-26 12:03:24 +08:00
arch: win64_msvc2019_64
2024-04-26 11:13:32 +08:00
dir: ${{ runner.temp }}
setup-python: true
- name: Run build script
2024-04-26 12:03:24 +08:00
run: python build.py 64
2024-04-26 16:45:45 +08:00
2024-04-26 12:20:10 +08:00
- name: Pack
2024-04-26 16:45:45 +08:00
run: python build.py pack
- name: Upload plugin32 artifact
uses: actions/upload-artifact@v4
with:
name: plugin32
path: builds/plugin32.zip
- name: Upload plugin64 artifact
uses: actions/upload-artifact@v4
with:
name: plugin64
path: builds/plugin64.zip
- name: Upload English artifact
uses: actions/upload-artifact@v4
with:
name: Release_English
path: builds/Release_English.zip
- name: Upload Chinese artifact
uses: actions/upload-artifact@v4
with:
name: Release_Chinese
path: builds/Release_Chinese.zip
release:
needs: [build, build_xp]
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download plugin32 artifact
uses: actions/download-artifact@v4
with:
name: plugin32
path: builds
- name: Download plugin64 artifact
uses: actions/download-artifact@v4
with:
name: plugin64
path: builds
- name: Download English artifact
uses: actions/download-artifact@v4
with:
name: Release_English
path: builds
- name: Download Chinese artifact
uses: actions/download-artifact@v4
with:
name: Release_Chinese
path: builds
# - name: Download plugin32_xp artifact
# uses: actions/download-artifact@v4
# with:
# name: plugin32_xp
# path: builds
- name: Download English xp artifact
uses: actions/download-artifact@v4
with:
name: Release_English_xp
path: builds
- name: Download Chinese xp artifact
uses: actions/download-artifact@v4
with:
name: Release_Chinese_xp
path: builds
- name: Release LunaHook
2024-04-26 11:13:32 +08:00
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.create_release }}
files: |
builds/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}