2024-04-26 05:49:49 +08:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
2024-04-27 19:56:54 +08:00
|
|
|
workflow_dispatch:
|
2024-04-26 05:53:33 +08:00
|
|
|
|
2024-04-26 05:49:49 +08:00
|
|
|
jobs:
|
2024-11-02 19:55:32 +08:00
|
|
|
loadversion:
|
|
|
|
runs-on: windows-latest
|
|
|
|
outputs:
|
|
|
|
version: ${{ steps.loadversion.outputs.version }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- id: loadversion
|
2024-11-06 06:46:35 +08:00
|
|
|
run: python py/build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
|
|
|
|
hook:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
bits: [32, 64]
|
|
|
|
permissions:
|
|
|
|
id-token: write
|
|
|
|
attestations: write
|
|
|
|
contents: write
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
|
|
|
|
with:
|
|
|
|
sdk-version: 22621
|
|
|
|
- run: python cpp/LunaHook/build.py build English ${{matrix.bits}}
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: hook_${{matrix.bits}}
|
|
|
|
path: cpp/LunaHook/builds/Release_English
|
2024-11-02 19:55:32 +08:00
|
|
|
pyrt:
|
2024-04-26 05:49:49 +08:00
|
|
|
runs-on: windows-latest
|
2024-04-26 17:18:10 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-11-02 19:55:32 +08:00
|
|
|
architecture: [x86, x64]
|
2024-04-26 05:49:49 +08:00
|
|
|
steps:
|
2024-11-02 19:55:32 +08:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
2024-04-26 05:49:49 +08:00
|
|
|
with:
|
2024-06-25 17:53:01 +08:00
|
|
|
python-version: '3.7.9'
|
2024-04-26 17:18:10 +08:00
|
|
|
architecture: ${{ matrix.architecture }}
|
2024-11-02 19:55:32 +08:00
|
|
|
|
2024-11-06 06:46:35 +08:00
|
|
|
- run: python py/build.py pyrt ${{ matrix.architecture }} 3.7.9
|
2024-11-02 19:55:32 +08:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: pyrt_${{ matrix.architecture }}
|
2024-11-06 06:46:35 +08:00
|
|
|
path: py/pyrt
|
2024-11-02 19:55:32 +08:00
|
|
|
build_cpp:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
architecture: [x86, x64]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-05-01 22:25:00 +08:00
|
|
|
with:
|
2024-11-02 19:55:32 +08:00
|
|
|
submodules: recursive
|
|
|
|
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
|
|
|
|
with:
|
|
|
|
sdk-version: 22621
|
|
|
|
|
2024-11-06 06:46:35 +08:00
|
|
|
- run: python py/build.py cpp ${{ matrix.architecture }}
|
2024-04-26 17:18:10 +08:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-11-02 19:55:32 +08:00
|
|
|
name: cpp_${{ matrix.architecture }}
|
2024-11-06 06:46:35 +08:00
|
|
|
path: cpp/builds
|
2024-08-09 14:13:42 +08:00
|
|
|
|
2024-11-02 19:55:32 +08:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: windows-latest
|
2024-11-06 06:46:35 +08:00
|
|
|
needs: [pyrt,build_cpp,loadversion,hook]
|
2024-11-02 19:55:32 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- architecture: x86
|
|
|
|
fname: LunaTranslator_x86
|
|
|
|
- architecture: x64
|
|
|
|
fname: LunaTranslator
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
path: build
|
2024-11-06 06:46:35 +08:00
|
|
|
- run: python py/build.py merge ${{ matrix.architecture }}
|
2024-11-03 17:06:08 +08:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.fname }}
|
2024-11-06 06:46:35 +08:00
|
|
|
path: py/build/${{matrix.fname}}.zip
|
2024-11-02 19:55:32 +08:00
|
|
|
- uses: softprops/action-gh-release@v2
|
2024-04-26 05:49:49 +08:00
|
|
|
with:
|
2024-11-02 19:55:32 +08:00
|
|
|
tag_name: ${{ needs.loadversion.outputs.version }}
|
2024-04-28 00:50:54 +08:00
|
|
|
files: |
|
2024-11-06 06:46:35 +08:00
|
|
|
py/build/${{matrix.fname}}.zip
|
2024-04-26 05:49:49 +08:00
|
|
|
env:
|
2024-11-02 19:55:32 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|