From 7c0beaa7e0a58435f535f594b7ca95c502a7bddb Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 14:48:08 +0800 Subject: [PATCH 01/28] Update and rename dotnet-desktop.yml to build.yml --- .../workflows/{dotnet-desktop.yml => build.yml} | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) rename .github/workflows/{dotnet-desktop.yml => build.yml} (83%) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/build.yml similarity index 83% rename from .github/workflows/dotnet-desktop.yml rename to .github/workflows/build.yml index 91acc601..187724d5 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: .NET Core Desktop +name: Build PCL2 on: push: @@ -6,11 +6,7 @@ on: - 'Plain Craft Launcher 2.sln' - 'Plain Craft Launcher 2/**' - '.github/workflows/**' - pull_request: - paths: - - 'Plain Craft Launcher 2.sln' - - 'Plain Craft Launcher 2/**' - - '.github/workflows/**' + workflow_dispatch: jobs: @@ -26,6 +22,7 @@ jobs: Solution_Name: Plain Craft Launcher 2.sln Wap_Project_Directory: Plain Craft Launcher 2 Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj + Configuration: ${{ matrix.configuration }} steps: - name: Checkout @@ -40,8 +37,7 @@ jobs: # Restore the application to populate the obj folder with RuntimeIdentifiers - name: Restore the application run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - env: - Configuration: ${{ matrix.configuration }} + # Create the app package by building and packaging the Windows Application Packaging project - name: Create the app package @@ -50,11 +46,10 @@ jobs: Appx_Bundle: Always Appx_Bundle_Platforms: x86|x64|ARM|ARM64 Appx_Package_Build_Mode: StoreUpload - Configuration: ${{ matrix.configuration }} # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: ${{ matrix.configuration }} - path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe \ No newline at end of file + path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 8fe6c5c3443d2ee865b3bd001381fd204a5e23cb Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 14:51:06 +0800 Subject: [PATCH 02/28] Try Update build.yml --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 187724d5..fc9c194c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,13 +39,13 @@ jobs: run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - # Create the app package by building and packaging the Windows Application Packaging project - - name: Create the app package - run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle - env: - Appx_Bundle: Always - Appx_Bundle_Platforms: x86|x64|ARM|ARM64 - Appx_Package_Build_Mode: StoreUpload + # # Create the app package by building and packaging the Windows Application Packaging project + # - name: Create the app package + # run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle + # env: + # Appx_Bundle: Always + # Appx_Bundle_Platforms: x86|x64|ARM|ARM64 + # Appx_Package_Build_Mode: StoreUpload # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - name: Upload build artifacts From ccf4e9517da50f5bc34387c90e526488e7526f98 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 23:00:55 +0800 Subject: [PATCH 03/28] Try Update build.yml again --- .github/workflows/build.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc9c194c..18ca13b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: with: fetch-depth: 0 - # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild + # setup msbuild - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v2 @@ -39,13 +39,14 @@ jobs: run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - # # Create the app package by building and packaging the Windows Application Packaging project - # - name: Create the app package - # run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle - # env: - # Appx_Bundle: Always - # Appx_Bundle_Platforms: x86|x64|ARM|ARM64 - # Appx_Package_Build_Mode: StoreUpload + # Create the app package by building and packaging the Windows Application Packaging project + - name: Create the app package + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration + # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle + # env: + # Appx_Bundle: Always + # Appx_Bundle_Platforms: x86|x64|ARM|ARM64 + # Appx_Package_Build_Mode: StoreUpload # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - name: Upload build artifacts From 5593049913f70e28246667b2490a22d3eb2b0b0c Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 23:23:19 +0800 Subject: [PATCH 04/28] Update build.yml --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18ca13b6..7bef6ab5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build PCL2 +name: 构建 PCL2 on: push: @@ -22,7 +22,7 @@ jobs: Solution_Name: Plain Craft Launcher 2.sln Wap_Project_Directory: Plain Craft Launcher 2 Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - Configuration: ${{ matrix.configuration }} + # Configuration: ${{ matrix.configuration }} steps: - name: Checkout @@ -31,17 +31,17 @@ jobs: fetch-depth: 0 # setup msbuild - - name: Setup MSBuild.exe + - name: 安装 MSBuild uses: microsoft/setup-msbuild@v2 - # Restore the application to populate the obj folder with RuntimeIdentifiers - - name: Restore the application - run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration + # # Restore the application to populate the obj folder with RuntimeIdentifiers + # - name: Restore the application + # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration # Create the app package by building and packaging the Windows Application Packaging project - - name: Create the app package - run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration + - name: 编译 PCL + run: msbuild $env:Wap_Project_Path /p:Configuration=$matrix:configuration # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle # env: # Appx_Bundle: Always @@ -49,7 +49,7 @@ jobs: # Appx_Package_Build_Mode: StoreUpload # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - - name: Upload build artifacts + - name: 上传编译产物 uses: actions/upload-artifact@v4 with: name: ${{ matrix.configuration }} From 85a138092a61708303b5a3aa74374f4d93161c1d Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 23:28:21 +0800 Subject: [PATCH 05/28] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bef6ab5..4e846810 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: # Configuration: ${{ matrix.configuration }} steps: - - name: Checkout + - name: 签出仓库 uses: actions/checkout@v4 with: fetch-depth: 0 @@ -41,7 +41,7 @@ jobs: # Create the app package by building and packaging the Windows Application Packaging project - name: 编译 PCL - run: msbuild $env:Wap_Project_Path /p:Configuration=$matrix:configuration + run: msbuild $env:Wap_Project_Path /p:Configuration=${{ matrix:configuration }} /t:Rebuild # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle # env: # Appx_Bundle: Always From 7f6b2938dabc283fe9f33828fbbabb70be48e0d5 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 23:29:43 +0800 Subject: [PATCH 06/28] Update build.yml --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e846810..54f81081 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: Solution_Name: Plain Craft Launcher 2.sln Wap_Project_Directory: Plain Craft Launcher 2 Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - # Configuration: ${{ matrix.configuration }} + Configuration: ${{ matrix.configuration }} steps: - name: 签出仓库 @@ -41,7 +41,7 @@ jobs: # Create the app package by building and packaging the Windows Application Packaging project - name: 编译 PCL - run: msbuild $env:Wap_Project_Path /p:Configuration=${{ matrix:configuration }} /t:Rebuild + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle # env: # Appx_Bundle: Always @@ -52,5 +52,5 @@ jobs: - name: 上传编译产物 uses: actions/upload-artifact@v4 with: - name: ${{ matrix.configuration }} + name: ${{ env.Configuration }} path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From f5653cbd270e32b6e3343dc64a4b8f9f1998fe9a Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Fri, 31 May 2024 23:44:04 +0800 Subject: [PATCH 07/28] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54f81081..df8708c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - configuration: [Beta, Debug, Release, ReleaseUpdate] + configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate] runs-on: windows-latest From ddb00d03033a9845ea68fe67c42654297aeba992 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 06:47:40 +0800 Subject: [PATCH 08/28] Create build-pr.yml --- .github/workflows/build-pr.yml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/build-pr.yml diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 00000000..22244d25 --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,49 @@ +name: 构建来自 Pull Request 的 PCL + +on: + pull_request: + paths: + - 'Plain Craft Launcher 2.sln' + - 'Plain Craft Launcher 2/**' + - '.github/workflows/**' + +jobs: + + build: + + strategy: + matrix: + configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate] + + runs-on: windows-latest + + env: + Solution_Name: Plain Craft Launcher 2.sln + Wap_Project_Directory: Plain Craft Launcher 2 + Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj + Configuration: ${{ matrix.configuration }} + + steps: + - name: 签出仓库 + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # setup msbuild + - name: 安装 MSBuild + uses: microsoft/setup-msbuild@v2 + + # # Restore the application to populate the obj folder with RuntimeIdentifiers + # - name: Restore the application + # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration + + # Create the app package by building and packaging the Windows Application Packaging project + - name: 编译 PCL + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild + + # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact + - name: 上传编译产物 + uses: actions/upload-artifact@v4 + with: + name: ${{ env.Configuration }} + path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 2ff1ac7254da3ab9adc20f422cac1388abfe6eaa Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 06:47:59 +0800 Subject: [PATCH 09/28] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df8708c3..b1858e45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: 构建 PCL2 +name: 构建 PCL on: push: From 9ba57ab2eb5788c9e58858371e2f81c9b5a96dee Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 07:26:17 +0800 Subject: [PATCH 10/28] Fix a typo Signed-off-by: Silverteal <67404722+Silverteal@users.noreply.github.com> --- .github/workflows/build-pr.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 22244d25..5e03b995 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -46,4 +46,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.Configuration }} - path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe + path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1858e45..830f9ba0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,4 +53,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.Configuration }} - path: ${{ env.Wap_Project_Directory }}\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe + path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe From 862281c3240aca4d0c198b4273bfc3d05885eab1 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 09:55:17 +0800 Subject: [PATCH 11/28] Update build.yml --- .github/workflows/build.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 830f9ba0..98cc304c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,18 @@ jobs: strategy: matrix: - configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate] - + include: + - name: 调试版 + configuration: Debug + - name: 开发版 + configuration: Snapshot + - name: 快照版 + configuration: Release + - name: 更新的快照版 + configuration: ReleaseUpdate + - name: 正式版 + configuration: BETA + runs-on: windows-latest env: @@ -23,6 +33,7 @@ jobs: Wap_Project_Directory: Plain Craft Launcher 2 Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} + Version_Friendly_Name: ${{ matrix.name }} steps: - name: 签出仓库 @@ -52,5 +63,5 @@ jobs: - name: 上传编译产物 uses: actions/upload-artifact@v4 with: - name: ${{ env.Configuration }} + name: ${{ env.Version_Friendly_Name }} path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe From 9a05dc1e6be835f5ee83387e62d2211a934c4fe2 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 10:04:19 +0800 Subject: [PATCH 12/28] Update build.yml --- .github/workflows/build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98cc304c..d6f49351 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,11 @@ on: - 'Plain Craft Launcher 2.sln' - 'Plain Craft Launcher 2/**' - '.github/workflows/**' + pull_request: + paths: + - 'Plain Craft Launcher 2.sln' + - 'Plain Craft Launcher 2/**' + - '.github/workflows/**' workflow_dispatch: jobs: @@ -21,7 +26,7 @@ jobs: configuration: Snapshot - name: 快照版 configuration: Release - - name: 更新的快照版 + - name: 快照版(通过在线更新) configuration: ReleaseUpdate - name: 正式版 configuration: BETA @@ -49,9 +54,8 @@ jobs: # - name: Restore the application # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - # Create the app package by building and packaging the Windows Application Packaging project - - name: 编译 PCL + - name: 编译源代码 run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle # env: From 331d6ca5f18c45a9217cbf5d3ceaf043591254ae Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 10:05:11 +0800 Subject: [PATCH 13/28] Delete .github/workflows/build-pr.yml --- .github/workflows/build-pr.yml | 49 ---------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 .github/workflows/build-pr.yml diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml deleted file mode 100644 index 5e03b995..00000000 --- a/.github/workflows/build-pr.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: 构建来自 Pull Request 的 PCL - -on: - pull_request: - paths: - - 'Plain Craft Launcher 2.sln' - - 'Plain Craft Launcher 2/**' - - '.github/workflows/**' - -jobs: - - build: - - strategy: - matrix: - configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate] - - runs-on: windows-latest - - env: - Solution_Name: Plain Craft Launcher 2.sln - Wap_Project_Directory: Plain Craft Launcher 2 - Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - Configuration: ${{ matrix.configuration }} - - steps: - - name: 签出仓库 - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # setup msbuild - - name: 安装 MSBuild - uses: microsoft/setup-msbuild@v2 - - # # Restore the application to populate the obj folder with RuntimeIdentifiers - # - name: Restore the application - # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - - # Create the app package by building and packaging the Windows Application Packaging project - - name: 编译 PCL - run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild - - # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - - name: 上传编译产物 - uses: actions/upload-artifact@v4 - with: - name: ${{ env.Configuration }} - path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe From 3a1c24a517caf9ff776d33d5a6a4c6bbc76f7216 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 10:12:33 +0800 Subject: [PATCH 14/28] Update build.yml, optimize language --- .github/workflows/build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6f49351..ad190cac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: configuration: Snapshot - name: 快照版 configuration: Release - - name: 快照版(通过在线更新) + - name: 更新快照版 configuration: ReleaseUpdate - name: 正式版 configuration: BETA @@ -57,12 +57,7 @@ jobs: # Create the app package by building and packaging the Windows Application Packaging project - name: 编译源代码 run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild - # /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle - # env: - # Appx_Bundle: Always - # Appx_Bundle_Platforms: x86|x64|ARM|ARM64 - # Appx_Package_Build_Mode: StoreUpload - + # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact - name: 上传编译产物 uses: actions/upload-artifact@v4 From 27264e16cbdce0a11d9cc3899ad7b19a21d3c263 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 18:52:50 +0800 Subject: [PATCH 15/28] Update build.yml --- .github/workflows/build.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad190cac..64d20de8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,6 @@ jobs: runs-on: windows-latest env: - Solution_Name: Plain Craft Launcher 2.sln Wap_Project_Directory: Plain Craft Launcher 2 Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} @@ -46,19 +45,14 @@ jobs: with: fetch-depth: 0 - # setup msbuild - - name: 安装 MSBuild + - name: 配置 MSBuild uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x64 - # # Restore the application to populate the obj folder with RuntimeIdentifiers - # - name: Restore the application - # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration - - # Create the app package by building and packaging the Windows Application Packaging project - name: 编译源代码 run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild - - # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact + - name: 上传编译产物 uses: actions/upload-artifact@v4 with: From 3f9ba48749478cdabf750f8ddabbf113f9dbc699 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 18:54:20 +0800 Subject: [PATCH 16/28] Update build.yml --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64d20de8..2e09f3f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,10 @@ name: 构建 PCL on: push: paths: - - 'Plain Craft Launcher 2.sln' - 'Plain Craft Launcher 2/**' - '.github/workflows/**' pull_request: paths: - - 'Plain Craft Launcher 2.sln' - 'Plain Craft Launcher 2/**' - '.github/workflows/**' workflow_dispatch: @@ -20,7 +18,7 @@ jobs: strategy: matrix: include: - - name: 调试版 + - name: 可调试开发版 configuration: Debug - name: 开发版 configuration: Snapshot From 3aab7ead7a809ab6d2b48eb689edf526ef5fd82d Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 18:57:41 +0800 Subject: [PATCH 17/28] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e09f3f6..8ffc4916 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: runs-on: windows-latest env: - Wap_Project_Directory: Plain Craft Launcher 2 + # Wap_Project_Directory: Plain Craft Launcher 2 Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} Version_Friendly_Name: ${{ matrix.name }} @@ -55,4 +55,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.Version_Friendly_Name }} - path: ${{ env.Wap_Project_Directory }}\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe + path: Plain Craft Launcher 2\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe From 941a111749d81566e3fe197e5753a1914bd64364 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:01:12 +0800 Subject: [PATCH 18/28] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ffc4916..45e51da0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: env: # Wap_Project_Directory: Plain Craft Launcher 2 - Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj + # Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} Version_Friendly_Name: ${{ matrix.name }} @@ -49,7 +49,7 @@ jobs: msbuild-architecture: x64 - name: 编译源代码 - run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /t:Rebuild + run: msbuild Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj /p:Configuration=$env:Configuration /t:Rebuild - name: 上传编译产物 uses: actions/upload-artifact@v4 From af3737df1eb2d8c3501a5dcfa3b9f367f48a02bc Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:04:45 +0800 Subject: [PATCH 19/28] Update build.yml --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45e51da0..d2e43b69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,6 @@ jobs: env: # Wap_Project_Directory: Plain Craft Launcher 2 - # Wap_Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} Version_Friendly_Name: ${{ matrix.name }} @@ -48,8 +47,11 @@ jobs: with: msbuild-architecture: x64 + # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 - name: 编译源代码 - run: msbuild Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj /p:Configuration=$env:Configuration /t:Rebuild + run: msbuild $Path /p:Configuration=$env:Configuration /t:Rebuild + env: + Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - name: 上传编译产物 uses: actions/upload-artifact@v4 From 36a71e035b683977b599b64b3e3a6fb853a036ae Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:28:24 +0800 Subject: [PATCH 20/28] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2e43b69..fbd0e57f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 - name: 编译源代码 - run: msbuild $Path /p:Configuration=$env:Configuration /t:Rebuild + run: msbuild $env:Path /p:Configuration=$env:Configuration /t:Rebuild env: Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj From 937f947d7144accb3bf039f65752fb8c435f75b9 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:43:48 +0800 Subject: [PATCH 21/28] Update build.yml --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbd0e57f..751c2cfe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,7 @@ jobs: env: # Wap_Project_Directory: Plain Craft Launcher 2 + Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} Version_Friendly_Name: ${{ matrix.name }} @@ -50,8 +51,8 @@ jobs: # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 - name: 编译源代码 run: msbuild $env:Path /p:Configuration=$env:Configuration /t:Rebuild - env: - Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj + # env: + # - name: 上传编译产物 uses: actions/upload-artifact@v4 From e4ecc79bc97fab00d119c230110f0c4d62365ea2 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 19:54:17 +0800 Subject: [PATCH 22/28] Update build.yml --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 751c2cfe..d4272e2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,6 @@ jobs: env: # Wap_Project_Directory: Plain Craft Launcher 2 - Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj Configuration: ${{ matrix.configuration }} Version_Friendly_Name: ${{ matrix.name }} @@ -50,9 +49,9 @@ jobs: # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 - name: 编译源代码 - run: msbuild $env:Path /p:Configuration=$env:Configuration /t:Rebuild - # env: - # + run: msbuild $env:Project_Path /p:Configuration=$env:Configuration /t:Rebuild + env: + Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - name: 上传编译产物 uses: actions/upload-artifact@v4 From 3eacf3ff677b46dd852ab5d551601a4532159089 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 21:02:54 +0800 Subject: [PATCH 23/28] Update build.yml --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4272e2a..fd5fcb36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,12 +49,12 @@ jobs: # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 - name: 编译源代码 - run: msbuild $env:Project_Path /p:Configuration=$env:Configuration /t:Rebuild + run: msbuild $env:Project_Path /p:Configuration=$env:Configuration env: Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - name: 上传编译产物 uses: actions/upload-artifact@v4 with: - name: ${{ env.Version_Friendly_Name }} - path: Plain Craft Launcher 2\obj\${{ env.Configuration }}\Plain Craft Launcher 2.exe + name: ${{ matrix.Version_Friendly_Name }} + path: Plain Craft Launcher 2\obj\${{ matrix.Configuration }}\Plain Craft Launcher 2.exe From 84b4b3b8e5df5290d63e414a20254a4d753c6668 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 21:07:56 +0800 Subject: [PATCH 24/28] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd5fcb36..04408367 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,5 +56,5 @@ jobs: - name: 上传编译产物 uses: actions/upload-artifact@v4 with: - name: ${{ matrix.Version_Friendly_Name }} - path: Plain Craft Launcher 2\obj\${{ matrix.Configuration }}\Plain Craft Launcher 2.exe + name: ${{ matrix.name }} + path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 3a07beb5317c74b7477778f0a6d5c8d85793683b Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 21:20:24 +0800 Subject: [PATCH 25/28] Update build.yml --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04408367..e42fba20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,8 +33,8 @@ jobs: env: # Wap_Project_Directory: Plain Craft Launcher 2 - Configuration: ${{ matrix.configuration }} - Version_Friendly_Name: ${{ matrix.name }} + Configuration: + # Version_Friendly_Name: ${{ matrix.name }} steps: - name: 签出仓库 @@ -49,9 +49,10 @@ jobs: # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 - name: 编译源代码 - run: msbuild $env:Project_Path /p:Configuration=$env:Configuration + run: msbuild $env:Project_Path /p:Configuration=${{ matrix.configuration }} env: Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj + # Configuration: - name: 上传编译产物 uses: actions/upload-artifact@v4 From b18a5340f25a204e64ab218669f9912d03c4cae1 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:32:57 +0800 Subject: [PATCH 26/28] Update build.yml --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e42fba20..13f6474d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,21 +1,28 @@ +# 定义工作流名称 name: 构建 PCL +# 定义触发器 on: + # 提交内容修改代码或编辑工作流时 push: paths: - 'Plain Craft Launcher 2/**' - '.github/workflows/**' + # 新的PR修改代码或编辑工作流时 pull_request: paths: - 'Plain Craft Launcher 2/**' - '.github/workflows/**' + # 手动触发时 workflow_dispatch: +# 定义工作列表 jobs: - + # 唯一的工作:build build: - + strategy: + # 定义矩阵,矩阵中每组都会单独执行,并使矩阵本身成为可用的上下文 matrix: include: - name: 可调试开发版 @@ -28,34 +35,45 @@ jobs: configuration: ReleaseUpdate - name: 正式版 configuration: BETA - + + # 显然,只有Windows才能构建.NET Framework程序 runs-on: windows-latest - env: - # Wap_Project_Directory: Plain Craft Launcher 2 - Configuration: - # Version_Friendly_Name: ${{ matrix.name }} - + # 定义步骤列表 steps: + + # 第一步,签出仓库到本地 - name: 签出仓库 + # 调用actions/checkout仓库的调用预设工作流 uses: actions/checkout@v4 + # 调用参数 with: + # 只签出第一层 fetch-depth: 0 + # 第二步,配置.NET生成工具 - name: 配置 MSBuild uses: microsoft/setup-msbuild@v2 with: + # 使用64位架构的生成工具 msbuild-architecture: x64 - # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 + # 第三步,编译 - name: 编译源代码 + # 直接运行Powershell命令 + # ${{}}括号内的是工作流表达式,此处即当前运行的矩阵的参数,运行时将直接替换 + # $env:是Powershell读取环境变量的语法 run: msbuild $env:Project_Path /p:Configuration=${{ matrix.configuration }} env: + # 设置单个步骤的环境变量 + # 由于路径包含空格,使用环境变量传入路径,避免令人疑惑的引号写法 Project_Path: Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj - # Configuration: - + + # 第四步,上传编译产物到Artifacts - name: 上传编译产物 uses: actions/upload-artifact@v4 with: + # Artifact压缩包名称 name: ${{ matrix.name }} + # 将要上传的对象,将被压缩为Artifact压缩包 path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 32b68835753f0cd2bc920bb8e752d1c7c3d192b0 Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sat, 1 Jun 2024 23:21:43 +0800 Subject: [PATCH 27/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20build.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13f6474d..c443595d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,13 +25,13 @@ jobs: # 定义矩阵,矩阵中每组都会单独执行,并使矩阵本身成为可用的上下文 matrix: include: - - name: 可调试开发版 + - name: 开发版_可调试 configuration: Debug - name: 开发版 configuration: Snapshot - name: 快照版 configuration: Release - - name: 更新快照版 + - name: 快照版_通过更新 configuration: ReleaseUpdate - name: 正式版 configuration: BETA @@ -74,6 +74,6 @@ jobs: uses: actions/upload-artifact@v4 with: # Artifact压缩包名称 - name: ${{ matrix.name }} + name: ${{ matrix.name }}_${{ matrix.configuration }} # 将要上传的对象,将被压缩为Artifact压缩包 path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 0703c4d938477d2685dbb02ef31f090944aff6df Mon Sep 17 00:00:00 2001 From: Silverteal <67404722+Silverteal@users.noreply.github.com> Date: Sun, 2 Jun 2024 07:09:31 +0800 Subject: [PATCH 28/28] Update build.yml --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c443595d..5dea0582 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,13 +25,13 @@ jobs: # 定义矩阵,矩阵中每组都会单独执行,并使矩阵本身成为可用的上下文 matrix: include: - - name: 开发版_可调试 + - name: 开发版 configuration: Debug - name: 开发版 configuration: Snapshot - name: 快照版 configuration: Release - - name: 快照版_通过更新 + - name: 快照版 configuration: ReleaseUpdate - name: 正式版 configuration: BETA @@ -51,18 +51,18 @@ jobs: # 只签出第一层 fetch-depth: 0 - # 第二步,配置.NET生成工具 + # 第二步,配置生成工具 - name: 配置 MSBuild uses: microsoft/setup-msbuild@v2 with: - # 使用64位架构的生成工具 + # 生成工具使用64位架构 msbuild-architecture: x64 # 第三步,编译 - name: 编译源代码 - # 直接运行Powershell命令 - # ${{}}括号内的是工作流表达式,此处即当前运行的矩阵的参数,运行时将直接替换 - # $env:是Powershell读取环境变量的语法 + # 直接运行Powershell命令 + # ${{}}括号内的是工作流表达式,此处即当前运行的矩阵的参数,运行时将直接替换 + # $env:是Powershell读取环境变量的语法 run: msbuild $env:Project_Path /p:Configuration=${{ matrix.configuration }} env: # 设置单个步骤的环境变量 @@ -73,7 +73,7 @@ jobs: - name: 上传编译产物 uses: actions/upload-artifact@v4 with: - # Artifact压缩包名称 + # Artifact压缩包名称,此处命名为友好名称_原始名称 name: ${{ matrix.name }}_${{ matrix.configuration }} # 将要上传的对象,将被压缩为Artifact压缩包 path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe