From f1317ab987724d54888aa8570fb7079a48980cbc Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 25 Aug 2023 11:23:44 -0400 Subject: [PATCH 1/6] Fix winget package not deploying - Provide .msi for `push_manifest.ps1` Fixes #1640 --- .github/workflows/ci-pipeline.yml | 12 ++++++++++++ build/package/winget/push_manifest.ps1 | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 1a3148db03..f7ce8f0cfd 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1508,6 +1508,12 @@ jobs: $tgsVersion = $versionXML.Project.PropertyGroup.TgsCoreVersion echo "TGS_VERSION=$tgsVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + - name: Upload .msi + uses: actions/upload-artifact@v3 + with: + name: packaging-windows-raw-msi + path: build/package/winget/Tgstation.Server.Host.Service.Wix/bin/x86/Release/en-US/tgstation-server.msi + - name: Retrieve Server Service uses: actions/download-artifact@v3 with: @@ -1722,6 +1728,12 @@ jobs: $Env:TGS_HOST_NO_WEBPANEL=true dotnet build -c Release tools/Tgstation.Server.ReleaseNotes + - name: Retrieve Server Service + uses: actions/download-artifact@v3 + with: + name: packaging-windows-raw-msi + path: artifacts + - name: Execute Push Script shell: powershell run: build/package/winget/push_manifest.ps1 diff --git a/build/package/winget/push_manifest.ps1 b/build/package/winget/push_manifest.ps1 index 8e7b42d9bf..fefd65fe7a 100644 --- a/build/package/winget/push_manifest.ps1 +++ b/build/package/winget/push_manifest.ps1 @@ -15,6 +15,7 @@ try } $installerHash = Get-FileHash -Path "artifacts/tgstation-server-installer.exe" -ErrorAction Stop # SHA256 is the default +$msiPath = [System.IO.Path]::Combine($pwd, "artifacts/tgstation-server.msi").Replace("/", "\"); Push-Location build/package/winget try @@ -24,7 +25,6 @@ try $devReleaseDate = '2023-06-24' $devProductCode = "{D24887FA-3228-4509-B5F3-4E07E349F278}" - $msiPath = [System.IO.Path]::Combine($pwd, "Tgstation.Server.Host.Service.Wix/bin/x86/Release/en-US/tgstation-server.msi").Replace("/", "\"); Set-Location manifest Convert-Path -ErrorAction Stop -LiteralPath $msiPath $windowsInstaller = New-Object -ComObject WindowsInstaller.Installer From daa6db743a7fc001fa6f98dd92354e76fa69b0b6 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 25 Aug 2023 11:24:03 -0400 Subject: [PATCH 2/6] Version bump to 5.15.1 --- build/Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index de451f3b0e..7b11cf0938 100644 --- a/build/Version.props +++ b/build/Version.props @@ -3,7 +3,7 @@ - 5.15.0 + 5.15.1 4.7.1 9.12.0 6.0.1 From c0189c8fa5254b0ddc7238db7cae64672b6dede2 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 27 Aug 2023 09:08:57 -0400 Subject: [PATCH 3/6] Fix .msi upload during deployment --- .github/workflows/ci-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index f7ce8f0cfd..2c9fdd3aad 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1512,7 +1512,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: packaging-windows-raw-msi - path: build/package/winget/Tgstation.Server.Host.Service.Wix/bin/x86/Release/en-US/tgstation-server.msi + path: build/package/winget/Tgstation.Server.Host.Service.Wix/bin/Release/en-US/tgstation-server.msi - name: Retrieve Server Service uses: actions/download-artifact@v3 From 422b39294dbecd009100433da73e3fe8b8e19aef Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 27 Aug 2023 12:42:12 -0400 Subject: [PATCH 4/6] Fix mkdir call --- build/package/winget/push_manifest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package/winget/push_manifest.ps1 b/build/package/winget/push_manifest.ps1 index fefd65fe7a..59cd275ba6 100644 --- a/build/package/winget/push_manifest.ps1 +++ b/build/package/winget/push_manifest.ps1 @@ -4,7 +4,7 @@ $ErrorActionPreference="Stop" $tgsVersion = $versionXML.Project.PropertyGroup.TgsCoreVersion -mkdir artifacts +New-Item artifacts -ItemType Directory -ErrorAction SilentlyContinue $previousProgressPreference = $ProgressPreference $ProgressPreference = 'SilentlyContinue' try From 061540d65eb4a5e8a8b7b736a1972a058af94be8 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 28 Aug 2023 09:29:00 -0400 Subject: [PATCH 5/6] Fix setting `TGS_HOST_NO_WEBPANEL=true` in CI --- .github/workflows/ci-pipeline.yml | 28 +++++++--------------------- .github/workflows/code-scanning.yml | 4 +--- build/package/deb/build_package.sh | 4 +--- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 2c9fdd3aad..e28fb8111a 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -191,9 +191,7 @@ jobs: run: dotnet restore - name: Build ReleaseNotes - run: | - export TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Build Changelog (Incremental) run: | @@ -1228,9 +1226,7 @@ jobs: run: dotnet restore - name: Build ReleaseNotes - run: | - export TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Run ReleaseNotes Check run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --winget-template-check ${{ steps.get-sha.outputs.pr_template_sha }} @@ -1271,9 +1267,7 @@ jobs: run: dotnet restore - name: Build ReleaseNotes - run: | - $Env:TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Parse API version shell: powershell @@ -1336,9 +1330,7 @@ jobs: run: dotnet restore - name: Build ReleaseNotes - run: | - $Env:TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Parse DMAPI version shell: powershell @@ -1400,9 +1392,7 @@ jobs: run: dotnet restore - name: Build ReleaseNotes - run: | - export TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Grab Most Recent Changelog run: curl -L https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -o changelog.yml @@ -1452,9 +1442,7 @@ jobs: run: dotnet restore - name: Build ReleaseNotes - run: | - export TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj - name: Run ReleaseNotes with --ensure-release run: dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --ensure-release @@ -1724,9 +1712,7 @@ jobs: uses: actions/checkout@v3 - name: Build ReleaseNotes - run: | - $Env:TGS_HOST_NO_WEBPANEL=true - dotnet build -c Release tools/Tgstation.Server.ReleaseNotes + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes - name: Retrieve Server Service uses: actions/download-artifact@v3 diff --git a/.github/workflows/code-scanning.yml b/.github/workflows/code-scanning.yml index d5366e8fd4..6680ca811c 100644 --- a/.github/workflows/code-scanning.yml +++ b/.github/workflows/code-scanning.yml @@ -37,9 +37,7 @@ jobs: languages: csharp - name: Build - run: | - export TGS_HOST_NO_WEBPANEL=true - dotnet build -c ReleaseNoWindows + run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/build/package/deb/build_package.sh b/build/package/deb/build_package.sh index dc653cdea0..626b48e4bb 100755 --- a/build/package/deb/build_package.sh +++ b/build/package/deb/build_package.sh @@ -32,9 +32,7 @@ dh_make -p tgstation-server_$TGS_VERSION -y --createorig -s rm -f debian/README* debian/changelog debian/*.ex debian/upstream/*.ex pushd .. -export TGS_HOST_NO_WEBPANEL=true -dotnet run -c Release --project tools/Tgstation.Server.ReleaseNotes $TGS_VERSION --debian packaging/debian/changelog $CURRENT_COMMIT -export TGS_HOST_NO_WEBPANEL=false +dotnet run -c Release -p:TGS_HOST_NO_WEBPANEL=true --project tools/Tgstation.Server.ReleaseNotes $TGS_VERSION --debian packaging/debian/changelog $CURRENT_COMMIT popd cp -r build/package/deb/debian/* debian/ From 4037410ce022ce254bd9b9ff0cca028c9fb924d0 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 28 Aug 2023 09:55:25 -0400 Subject: [PATCH 6/6] Hopefully fix code scanning build issues --- .github/workflows/code-scanning.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/code-scanning.yml b/.github/workflows/code-scanning.yml index 6680ca811c..fdd0e0ecdc 100644 --- a/.github/workflows/code-scanning.yml +++ b/.github/workflows/code-scanning.yml @@ -18,6 +18,9 @@ concurrency: group: "code-scanning-${{ github.head_ref || github.run_id }}-${{ github.event_name }}" cancel-in-progress: true +env: + TGS_DOTNET_VERSION: 6.0.x + jobs: analyze: name: Code Scanning @@ -28,6 +31,11 @@ jobs: security-events: write if: ${{ vars.TGS_ENABLE_CODE_QL }} == 'true' steps: + - name: Setup dotnet + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ env.TGS_DOTNET_VERSION }} + - name: Checkout uses: actions/checkout@v3