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:
|
|
|
|
build:
|
|
|
|
runs-on: windows-latest
|
2024-04-26 17:18:10 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- architecture: x86
|
2024-04-26 19:24:31 +08:00
|
|
|
fname: LunaTranslator_x86
|
2024-04-26 17:18:10 +08:00
|
|
|
- architecture: x64
|
2024-04-26 19:24:31 +08:00
|
|
|
fname: LunaTranslator
|
2024-04-26 05:49:49 +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 17:18:10 +08:00
|
|
|
- name: Install Python 3.7.9
|
2024-04-26 05:49:49 +08:00
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.7.9'
|
2024-04-26 17:18:10 +08:00
|
|
|
architecture: ${{ matrix.architecture }}
|
|
|
|
- name: Install Python 3.11
|
2024-04-26 05:49:49 +08:00
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
2024-04-26 17:18:10 +08:00
|
|
|
python-version: '3.11'
|
2024-04-26 05:53:33 +08:00
|
|
|
architecture: x64
|
2024-04-26 17:18:10 +08:00
|
|
|
- name: Install Python 3.11 req
|
2024-04-26 23:13:46 +08:00
|
|
|
run: pip install cmake pefile requests
|
2024-04-26 05:49:49 +08:00
|
|
|
- name: Run build script
|
|
|
|
run: |
|
2024-04-27 00:32:34 +08:00
|
|
|
python build.py ${{ matrix.architecture }}
|
2024-04-26 17:18:10 +08:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.fname }}
|
2024-04-26 19:24:31 +08:00
|
|
|
path: build/${{ matrix.fname }}.zip
|
2024-04-26 17:18:10 +08:00
|
|
|
|
2024-04-27 20:36:26 +08:00
|
|
|
- name: loadversion
|
|
|
|
id: loadversion
|
2024-04-27 20:46:50 +08:00
|
|
|
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
|
2024-04-26 05:49:49 +08:00
|
|
|
- name: Release LunaTranslator
|
|
|
|
uses: softprops/action-gh-release@v2
|
|
|
|
with:
|
2024-04-27 20:36:26 +08:00
|
|
|
tag_name: ${{ steps.loadversion.outputs.version }}
|
2024-04-26 19:24:31 +08:00
|
|
|
files: build/${{ matrix.fname }}.zip
|
2024-04-26 05:49:49 +08:00
|
|
|
env:
|
2024-04-26 17:18:10 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|