2024-04-26 05:49:49 +08:00
|
|
|
name: Build and Upload Artifacts
|
|
|
|
|
2024-04-26 08:43:34 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
2024-04-26 05:49:49 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v') != true
|
|
|
|
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 Python 3.7.9 x86
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.7.9'
|
|
|
|
architecture: x86
|
|
|
|
- name: Install Python 3.7.9 x64
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.7.9'
|
|
|
|
architecture: x64
|
|
|
|
- name: Install Python 3.11.7
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.11.7'
|
|
|
|
- name: Run build script
|
|
|
|
run: |
|
2024-04-26 05:59:40 +08:00
|
|
|
python build.py --github-actions
|
2024-04-26 05:49:49 +08:00
|
|
|
- name: Upload LunaTranslator artifact x86
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: LunaTranslator_x86
|
|
|
|
path: build/LunaTranslator_x86.zip
|
|
|
|
- name: Upload LunaTranslator artifact x64
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: LunaTranslator
|
|
|
|
path: build/LunaTranslator.zip
|