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

167 lines
4.9 KiB
YAML
Raw Normal View History

2024-04-26 11:13:32 +08:00
name: Release
on:
2024-08-09 13:55:29 +08:00
workflow_dispatch:
2024-04-26 11:13:32 +08:00
jobs:
2024-04-26 16:45:45 +08:00
build_xp:
runs-on: windows-2019
2024-04-26 19:34:44 +08:00
strategy:
matrix:
include:
- target: Release_English_winxp
- target: Release_Chinese_winxp
2024-06-22 23:00:29 +08:00
- target: Release_Russian_winxp
- target: Release_TradChinese_winxp
permissions:
id-token: write
attestations: write
2024-08-09 14:12:43 +08:00
contents: write
2024-04-26 16:45:45 +08:00
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 18:31:20 +08:00
- name: Install Python 3.11
uses: actions/setup-python@v5
2024-04-26 16:45:45 +08:00
with:
2024-04-26 18:31:20 +08:00
python-version: '3.11'
architecture: x64
2024-04-26 19:34:44 +08:00
- name: Run build script
run: python build.py ${{ matrix.target }}
2024-04-26 16:45:45 +08:00
- name: Pack
2024-04-26 19:27:07 +08:00
run: python build.py pack
2024-04-26 19:34:44 +08:00
2024-09-30 13:24:14 +08:00
# - name: Generate attestation for artifact
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: builds/${{ matrix.target }}.zip
2024-04-26 19:34:44 +08:00
- name: Upload artifact
2024-04-26 16:45:45 +08:00
uses: actions/upload-artifact@v4
with:
2024-04-26 19:34:44 +08:00
name: ${{ matrix.target }}
path: builds/${{ matrix.target }}.zip
2024-08-09 13:55:29 +08:00
- name: loadversion
id: loadversion
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
2024-04-26 19:08:58 +08:00
- name: Release LunaHook
uses: softprops/action-gh-release@v2
with:
2024-08-09 13:55:29 +08:00
tag_name: ${{ steps.loadversion.outputs.version }}
2024-04-26 19:34:44 +08:00
files: builds/${{ matrix.target }}.zip
2024-04-26 19:08:58 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2024-04-26 19:34:44 +08:00
2024-04-26 19:06:02 +08:00
build_plugin:
2024-04-26 11:13:32 +08:00
runs-on: windows-latest
2024-04-26 19:06:02 +08:00
strategy:
matrix:
include:
- cmd: plg32
qtarch: win32_msvc2019
2024-04-26 19:20:31 +08:00
target: plugin32
2024-04-26 19:06:02 +08:00
- cmd: plg64
qtarch: win64_msvc2019_64
2024-04-26 19:20:31 +08:00
target: plugin64
permissions:
id-token: write
attestations: write
2024-08-09 14:12:43 +08:00
contents: write
2024-04-26 11:13:32 +08:00
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 Qt
2024-04-26 11:13:32 +08:00
uses: jurplel/install-qt-action@v3.3.0
with:
2024-04-26 19:06:02 +08:00
version: 5.15.2
2024-04-26 11:13:32 +08:00
host: windows
target: desktop
2024-04-26 19:06:02 +08:00
arch: ${{ matrix.qtarch }}
2024-04-26 11:13:32 +08:00
dir: ${{ runner.temp }}
setup-python: true
- name: Run build script
2024-04-26 19:06:02 +08:00
run: python build.py ${{ matrix.cmd }}
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
2024-09-30 13:24:14 +08:00
# - name: Generate attestation for artifact
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: builds/${{ matrix.target }}.zip
2024-04-26 19:06:02 +08:00
- name: Upload artifact
2024-04-26 16:45:45 +08:00
uses: actions/upload-artifact@v4
with:
2024-04-26 19:06:02 +08:00
name: ${{ matrix.target }}
2024-04-26 19:20:31 +08:00
path: builds/${{ matrix.target }}.zip
2024-08-09 13:55:29 +08:00
- name: loadversion
id: loadversion
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
2024-04-26 19:08:58 +08:00
- name: Release LunaHook
uses: softprops/action-gh-release@v2
with:
2024-08-09 13:55:29 +08:00
tag_name: ${{ steps.loadversion.outputs.version }}
2024-04-26 19:20:31 +08:00
files: builds/${{ matrix.target }}.zip
2024-04-26 19:08:58 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2024-04-26 19:06:02 +08:00
build_everylang:
runs-on: windows-latest
strategy:
matrix:
include:
2024-06-22 23:00:29 +08:00
- target: Release_English
- target: Release_Chinese
- target: Release_Russian
- target: Release_TradChinese
permissions:
id-token: write
attestations: write
2024-08-09 14:12:43 +08:00
contents: write
2024-04-26 19:06:02 +08:00
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Windows 10 SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
2024-04-26 16:45:45 +08:00
with:
2024-04-26 19:06:02 +08:00
sdk-version: 22621
- name: Install Python 3.11
uses: actions/setup-python@v5
2024-04-26 16:45:45 +08:00
with:
2024-04-26 19:06:02 +08:00
python-version: '3.11'
architecture: x64
- name: Run build script
2024-06-22 23:00:29 +08:00
run: python build.py ${{ matrix.target }}
2024-04-26 19:06:02 +08:00
- name: Pack
run: python build.py pack
2024-09-30 13:24:14 +08:00
# - name: Generate attestation for artifact
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: builds/${{ matrix.target }}.zip
2024-04-26 19:06:02 +08:00
- name: Upload artifact
2024-04-26 16:45:45 +08:00
uses: actions/upload-artifact@v4
with:
2024-04-26 19:06:02 +08:00
name: ${{ matrix.target }}
2024-04-26 19:20:31 +08:00
path: builds/${{ matrix.target }}.zip
2024-08-09 13:55:29 +08:00
- name: loadversion
id: loadversion
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
2024-04-26 16:45:45 +08:00
- name: Release LunaHook
2024-04-26 11:13:32 +08:00
uses: softprops/action-gh-release@v2
with:
2024-08-09 13:55:29 +08:00
tag_name: ${{ steps.loadversion.outputs.version }}
2024-04-26 19:20:31 +08:00
files: builds/${{ matrix.target }}.zip
2024-04-26 11:13:32 +08:00
env:
2024-04-26 19:08:58 +08:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}