From 6006aaca7544bf8162c1fad50d3436446f00c066 Mon Sep 17 00:00:00 2001 From: Splamy Date: Sat, 13 Jul 2024 22:40:48 +0200 Subject: [PATCH] fix path in gha --- .github/workflows/dotnet.yml | 2 +- Tools/pack_linux.csx | 24 ---------- appveyor.yml | 91 ------------------------------------ 3 files changed, 1 insertion(+), 116 deletions(-) delete mode 100644 Tools/pack_linux.csx delete mode 100644 appveyor.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d5fed5a9..e87a319f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -82,7 +82,7 @@ jobs: - name: Publish run: | - dotnet publish TS3AudioBot\TS3AudioBot.csproj \ + dotnet publish TS3AudioBot/TS3AudioBot.csproj \ -c Release \ --framework net8.0 \ --self-contained \ diff --git a/Tools/pack_linux.csx b/Tools/pack_linux.csx deleted file mode 100644 index a643735e..00000000 --- a/Tools/pack_linux.csx +++ /dev/null @@ -1,24 +0,0 @@ -#r "nuget: SharpZipLib, 1.2.0" -#r "nuget: SimpleExec, 6.2.0" - -using ICSharpCode.SharpZipLib.Tar; -using ICSharpCode.SharpZipLib.GZip; -using static SimpleExec.Command; - -using (var fs = File.Open("TS3AudioBot.tar", FileMode.Create, FileAccess.Write)) -using (var tar = TarArchive.CreateOutputTarArchive(fs)) -using (var read = File.OpenRead("TS3AudioBot")) -{ - var entry = TarEntry.CreateEntryFromFile("TS3AudioBot"); - entry.TarHeader.Mode = Convert.ToInt32("0755", 8); - tar.WriteEntry(entry, false); -} - -Run("tar", "-rf TS3AudioBot.tar WebInterface"); - -using (var fs = File.Open("TS3AudioBot.tar.gz", FileMode.Create, FileAccess.Write)) -using (var gz = new GZipOutputStream(fs)) -using (var read = File.OpenRead("TS3AudioBot.tar")) -{ - read.CopyTo(gz); -} diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f032c91d..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,91 +0,0 @@ -version: appveyor-{branch}-{build} -branches: - only: - - master - - develop -image: Visual Studio 2022 -configuration: Release -clone_depth: 99999 -environment: - UPLOAD_TOKEN: - secure: wQTHAXf9NMII8m8gga6cVnA/yE6PCW5jzOppF7jgUlM= -cache: - - '%USERPROFILE%\.nuget\packages -> TS3AudioBot\TS3AudioBot.csproj, TSLib\TSLib.csproj, TS3ABotUnitTests\TS3ABotUnitTests.csproj' - - 'WebInterface\node_modules -> WebInterface\package.json' - -init: - - pwsh: dotnet --version; - -clone_script: -- pwsh: | - git clone -q --recursive --branch=$env:APPVEYOR_REPO_BRANCH https://github.com/$env:APPVEYOR_REPO_NAME.git $env:APPVEYOR_BUILD_FOLDER - git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - git fetch - git checkout -qf master - git checkout -qf $env:APPVEYOR_REPO_COMMIT - -install: - - ps: Install-Product node LTS - - pwsh: Install-Module Microsoft.PowerShell.Archive -MinimumVersion 1.2.5 -Repository PSGallery -Force - -build_script: -- pwsh: |- - dotnet restore - dotnet build TSLibAutogen -c Release - dotnet build -c Release - -deploy_script: -- pwsh: |- - if(${env:UPLOAD_TOKEN}) { - $dnver = "net6.0" - dotnet publish TS3AudioBot -c Release --framework $dnver - $targets_linux = "linux-x64", "linux-arm", "linux-arm64" - $targets = $targets_linux + "win-x64" - foreach ($target in $targets) { - Write-Host -ForegroundColor Yellow Publishing $target - dotnet publish TS3AudioBot -c Release --framework $dnver --self-contained --runtime $target -p:PublishSingleFile=true,PublishTrimmed=true,IncludeNativeLibrariesForSelfExtract=true - } - - Write-Host -ForegroundColor Yellow Extracting Version - $rel = [io.path]::combine("${env:APPVEYOR_BUILD_FOLDER}", "TS3AudioBot", "bin", "Release") - cd([io.path]::combine(${rel}, $dnver)) - (dotnet .\TS3AudioBot.dll -V | Out-String) -match "Version: (?[-_\d\w\.]+)" - $ver = $matches['version'] - echo "Current version: ${ver}" - - Write-Host -ForegroundColor Yellow Building Webinterface - cd([io.path]::combine("${env:APPVEYOR_BUILD_FOLDER}", "WebInterface")) - yarn install --frozen-lockfile - yarn run build - $webInter = [io.path]::combine(${rel}, "WebInterface") - Copy-Item "./dist" -Destination $webInter -Recurse - - Write-Host -ForegroundColor Yellow Packing $dnver - cd([io.path]::combine(${rel}, $dnver, "publish")) - Compress-Archive -Path *.*,lib,../../WebInterface -DestinationPath TS3AudioBot.zip - Invoke-RestMethod -Uri "https://splamy.de/api/nightly/projects/ts3ab/${env:APPVEYOR_REPO_BRANCH}?filename=TS3AudioBot.zip&commit=${env:APPVEYOR_REPO_COMMIT}&version=${ver}" -Headers @{ "Content-Type" = "application/zip"; "Authorization" = "${env:UPLOAD_TOKEN}" } -Method Put -InFile .\TS3AudioBot.zip - - Write-Host -ForegroundColor Yellow Packing win-x64 - cd([io.path]::combine(${rel}, $dnver, "win-x64", "publish")) - Compress-Archive -Path TS3AudioBot.exe,../../../WebInterface -DestinationPath TS3AudioBot.zip - Invoke-RestMethod -Uri "https://splamy.de/api/nightly/projects/ts3ab/${env:APPVEYOR_REPO_BRANCH}_win_x64?filename=TS3AudioBot.zip&commit=${env:APPVEYOR_REPO_COMMIT}&version=${ver}" -Headers @{ "Content-Type" = "application/zip"; "Authorization" = "${env:UPLOAD_TOKEN}" } -Method Put -InFile .\TS3AudioBot.zip - - $pack_linux = [io.path]::combine("${env:APPVEYOR_BUILD_FOLDER}", "Tools", "pack_linux.csx") - - foreach ($target in $targets_linux) { - Write-Host -ForegroundColor Yellow Packing $target - cd([io.path]::combine(${rel}, $dnver, $target, "publish")) - Copy-Item $webInter -Destination "./WebInterface" -Recurse - # creates TS3AudioBot.tar.gz - dotnet script $pack_linux - $name = $target -replace '-','_' - Invoke-RestMethod -Uri "https://splamy.de/api/nightly/projects/ts3ab/${env:APPVEYOR_REPO_BRANCH}_${name}?filename=TS3AudioBot.tar.gz&commit=${env:APPVEYOR_REPO_COMMIT}&version=${ver}" -Headers @{ "Content-Type" = "application/gzip"; "Authorization" = "${env:UPLOAD_TOKEN}" } -Method Put -InFile .\TS3AudioBot.tar.gz - } - } - -on_success: -- pwsh: |- - & ([io.path]::combine("${env:APPVEYOR_BUILD_FOLDER}", "Tools", "ts3notify.ps1")) 1 -on_failure: -- pwsh: |- - & ([io.path]::combine("${env:APPVEYOR_BUILD_FOLDER}", "Tools", "ts3notify.ps1")) 0