From 67d954f7e39c23e09c324b6c12b0fac9e213f315 Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Mon, 10 Jun 2024 09:26:24 +0800 Subject: [PATCH 1/9] Delete .github/workflows/build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 既然是重构,直接删了得了 --- .github/workflows/build.yml | 79 ------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 5dea058..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,79 +0,0 @@ -# 定义工作流名称 -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: 开发版 - configuration: Debug - - name: 开发版 - configuration: Snapshot - - name: 快照版 - configuration: Release - - name: 快照版 - configuration: ReleaseUpdate - - name: 正式版 - configuration: BETA - - # 显然,只有Windows才能构建.NET Framework程序 - runs-on: windows-latest - - # 定义步骤列表 - steps: - - # 第一步,签出仓库到本地 - - name: 签出仓库 - # 调用actions/checkout仓库的调用预设工作流 - uses: actions/checkout@v4 - # 调用参数 - with: - # 只签出第一层 - fetch-depth: 0 - - # 第二步,配置生成工具 - - 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 - - # 第四步,上传编译产物到Artifacts - - name: 上传编译产物 - uses: actions/upload-artifact@v4 - with: - # Artifact压缩包名称,此处命名为友好名称_原始名称 - name: ${{ matrix.name }}_${{ matrix.configuration }} - # 将要上传的对象,将被压缩为Artifact压缩包 - path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 9e43f9e75c50839f233176260e2f3003cc49b3fd Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:10:53 +0800 Subject: [PATCH 2/9] Create build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1 @@ + From 094737ef0127ddd7217fc55df9e67ba2560ea157 Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:04:32 +0800 Subject: [PATCH 3/9] Update build.yml --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b13789..cdcca32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1 +1,47 @@ +name: Build +on: + push: + paths: + - 'Plain Craft Launcher 2/**' + - '.github/workflows/**' + pull_request: + paths: + - 'Plain Craft Launcher 2/**' + - '.github/workflows/**' + +jobs: + + build: + + strategy: + matrix: + configuration: [Debug, Release, Snapshot, BETA, ReleaseUpdate] + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4.1.5 + with: + fetch-depth: 0 + + - name: Set Hash + shell: bash + run: | + Hash=`git rev-parse --short HEAD` + echo "Hash=$Hash" >> $GITHUB_ENV + + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x64 + + - name: Build + run: msbuild "Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj" -p:Configuration=${{ matrix.configuration }} + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.3.3 + with: + name: ${{ matrix.configuration }}-${{ env.Hash }} + path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From b6ca6dd7dca233657576eccc16c3c60653694600 Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:13:11 +0800 Subject: [PATCH 4/9] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cdcca32..bbcd3e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,5 +43,5 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v4.3.3 with: - name: ${{ matrix.configuration }}-${{ env.Hash }} + name: ${{ matrix.configuration }} ${{ env.Hash }} path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From ffcb39943273865273914ab56ce00881dfb55709 Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:36:35 +0800 Subject: [PATCH 5/9] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbcd3e1..ec78e72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4.1.5 + uses: actions/checkout@latest with: fetch-depth: 0 From 073f9ef549876881f93d5bdc4963116f5f843f54 Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:41:18 +0800 Subject: [PATCH 6/9] =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec78e72..5ed095a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@latest + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -41,7 +41,7 @@ jobs: run: msbuild "Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj" -p:Configuration=${{ matrix.configuration }} - name: Upload a Build Artifact - uses: actions/upload-artifact@v4.3.3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.configuration }} ${{ env.Hash }} path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 2996df399b42a0b84133ba7f5503ee63ccf1d7b2 Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Wed, 12 Jun 2024 06:11:49 +0800 Subject: [PATCH 7/9] =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ed095a..2ea832b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,8 +7,8 @@ on: - '.github/workflows/**' pull_request: paths: - - 'Plain Craft Launcher 2/**' - - '.github/workflows/**' + - 'Plain Craft Launcher 2/**' + - '.github/workflows/**' jobs: From af2787cdb8c54773ad0a0bdb095c5f10b8812dac Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:09:36 +0800 Subject: [PATCH 8/9] =?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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ea832b..1cce602 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,11 +26,11 @@ jobs: with: fetch-depth: 0 - - name: Set Hash + - name: Set Describe shell: bash run: | - Hash=`git rev-parse --short HEAD` - echo "Hash=$Hash" >> $GITHUB_ENV + Describe=`git describe` + echo "Describe=$Describe" >> $GITHUB_ENV - name: Setup MSBuild.exe uses: microsoft/setup-msbuild@v2 @@ -43,5 +43,5 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v4 with: - name: ${{ matrix.configuration }} ${{ env.Hash }} + name: ${{ matrix.configuration }} ${{ env.Describe }} path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe From 5c8888d138b787fddc21c379f95f22bef8b5d9ea Mon Sep 17 00:00:00 2001 From: allMagic <116283787+allMagicNB@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:11:17 +0800 Subject: [PATCH 9/9] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cce602..e0b81da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Set Describe shell: bash run: | - Describe=`git describe` + Describe=`git describe --tags` echo "Describe=$Describe" >> $GITHUB_ENV - name: Setup MSBuild.exe