57 lines
1.6 KiB
YAML
Raw Normal View History

name: Release
on:
2024-04-27 19:56:54 +08:00
workflow_dispatch:
2024-04-26 05:53:33 +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
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
uses: actions/setup-python@v5
with:
python-version: '3.7.9'
2024-04-26 17:18:10 +08:00
architecture: ${{ matrix.architecture }}
2024-05-01 22:25:00 +08:00
- name: Install Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- 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-28 00:50:54 +08:00
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.fname }} sfx
path: build/${{ matrix.fname }}.exe
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
- 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-28 00:50:54 +08:00
files: |
2024-04-28 00:51:29 +08:00
build/${{ matrix.fname }}.zip
build/${{ matrix.fname }}.exe
env:
2024-04-26 17:18:10 +08:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}