From 2348d3c8f34fc6c08aee25c5d31a3aa9746b8839 Mon Sep 17 00:00:00 2001 From: allMagicNB <116283787+allMagicNB@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:13:15 +0800 Subject: [PATCH] + env --- .github/workflows/build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 087db48..8aac8d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,10 +10,6 @@ on: - '.github/workflows/**' workflow_dispatch: inputs: - configuration: - description: 'Configuration' - default: 'Debug' - type: string release: description: 'Release' type: boolean @@ -22,6 +18,8 @@ jobs: build: name: Build runs-on: windows-latest + env: + configuration: Debug steps: - name: Checkout uses: actions/checkout@v4 @@ -43,12 +41,12 @@ jobs: (gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Client.Headers\("x-api-key"\) = ""', 'Client.Headers("x-api-key") = "${{ secrets.X_API_KEY }}"' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb" (gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Request.Headers\("x-api-key"\) = ""', 'Request.Headers("x-api-key") = "${{ secrets.X_API_KEY }}"' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb" - name: Build - run: msbuild "Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj" -p:Configuration=${{ inputs.configuration }} + run: msbuild "Plain Craft Launcher 2\Plain Craft Launcher 2.vbproj" -p:Configuration=${{ env.configuration }} - name: Upload a Build Artifact uses: actions/upload-artifact@v4 with: - name: ${{ inputs.configuration }} ${{ env.describe }} - path: Plain Craft Launcher 2\obj\${{ inputs.configuration }}\Plain Craft Launcher 2.exe + name: ${{ env.configuration }} ${{ env.describe }} + path: Plain Craft Launcher 2\obj\Debug\Plain Craft Launcher 2.exe - name: Release if: ${{ inputs.Release }} uses: softprops/action-gh-release@v2 @@ -57,4 +55,4 @@ jobs: with: name: ${{ env.describe }} tag_name: ${{ env.describe }} - files: Plain Craft Launcher 2\obj\${{ inputs.configuration }}\Plain Craft Launcher 2.exe \ No newline at end of file + files: Plain Craft Launcher 2\obj\${{ env.configuration }}\Plain Craft Launcher 2.exe \ No newline at end of file