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
|
|
|
|
run: python src/build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
- run: python src/build.py pyrt ${{ matrix.architecture }} 3.7.9
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: pyrt_${{ matrix.architecture }}
|
|
|
|
path: src/pyrt
|
|
|
|
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
|
|
|
|
|
|
|
|
- run: python src/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 }}
|
|
|
|
path: src/plugins/builds
|
2024-08-09 14:13:42 +08:00
|
|
|
|
2024-11-02 19:55:32 +08:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: windows-latest
|
|
|
|
needs: [pyrt,build_cpp,loadversion]
|
|
|
|
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
|
|
|
|
- run: python src/build.py merge ${{ matrix.architecture }}
|
2024-11-03 17:06:08 +08:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.fname }}
|
|
|
|
path: src/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-02 19:55:32 +08:00
|
|
|
src/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 }}
|