使用 GitHub Action 构建 HMCLauncher #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build HMCLauncher | |
on: | |
push: | |
paths: | |
- 'HMCLauncher/**' | |
- '.github/workflows/build-launcher.yml' | |
pull_request: | |
paths: | |
- 'HMCLauncher/**' | |
- '.github/workflows/build-launcher.yml' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
with: | |
msbuild-architecture: x86 | |
- name: Build HMCLauncher | |
run: msbuild /p:Configuration=Release /t:Rebuild /verbosity:diag .\HMCLauncher\ | |
- name: Get short SHA | |
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: HMCLauncher-${{ env.SHORT_SHA }} | |
path: HMCLauncher/Release/HMCLauncher.exe |