From 404bc88ec8529db3f2e6315dc46b0772bd605818 Mon Sep 17 00:00:00 2001 From: Glavo Date: Tue, 5 Mar 2024 04:59:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20GitHub=20Action=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=20HMCLauncher=20(#2890)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 使用 GitHub Action 构建 HMCLauncher * test * update * update * update * update --- .github/workflows/build-launcher.yml | 30 ++++++++++++++++++++++++++++ HMCLauncher/HMCLauncher.sln | 6 ------ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build-launcher.yml diff --git a/.github/workflows/build-launcher.yml b/.github/workflows/build-launcher.yml new file mode 100644 index 000000000..651de952c --- /dev/null +++ b/.github/workflows/build-launcher.yml @@ -0,0 +1,30 @@ +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:detailed .\HMCLauncher\ + - name: Get short SHA + run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: HMCLauncher-${{ env.SHORT_SHA }} + path: HMCLauncher/Release/HMCLauncher.exe diff --git a/HMCLauncher/HMCLauncher.sln b/HMCLauncher/HMCLauncher.sln index d516c1066..792b39bb9 100644 --- a/HMCLauncher/HMCLauncher.sln +++ b/HMCLauncher/HMCLauncher.sln @@ -7,18 +7,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HMCL", "HMCL\HMCL.vcxproj", EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x64.ActiveCfg = Debug|x64 - {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x64.Build.0 = Debug|x64 {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x86.ActiveCfg = Debug|Win32 {672B1019-E741-4C0D-A986-627E2ACE157B}.Debug|x86.Build.0 = Debug|Win32 - {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x64.ActiveCfg = Release|x64 - {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x64.Build.0 = Release|x64 {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x86.ActiveCfg = Release|Win32 {672B1019-E741-4C0D-A986-627E2ACE157B}.Release|x86.Build.0 = Release|Win32 EndGlobalSection