From ac6ce0c51764e84e99d5aee3b8b026d8683268be Mon Sep 17 00:00:00 2001 From: DDoSolitary Date: Mon, 14 Sep 2020 17:27:34 +0800 Subject: [PATCH] Migrate to SourceForge for uploading dev builds. --- .github/workflows/build.yml | 40 +++++++++++++++---------------------- README.md | 2 +- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4d5d5b..a6030d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,14 +18,13 @@ jobs: if ($LASTEXITCODE -ne 0) { Exit 1 } - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') run: | - $zip_name = "LxRunOffline-$(git describe --tags)-mingw.zip" - curl.exe -fsS ` - -T $zip_name ` - -u ddosolitary:${{ secrets.BINTRAY_KEY }} ` - -H "X-Bintray-Package: default" ` - -H "X-Bintray-Version: default" ` - -H "X-Bintray-Publish: 1" ` - https://api.bintray.com/content/ddosolitary/dev-releases/LxRunOffline/$zip_name + mkdir -Force ~\.ssh + [IO.File]::WriteAllBytes( ` + "$Env:USERPROFILE\.ssh\id_ed25519", ` + [Convert]::FromBase64String("${{ secrets.DEPLOYKEY }}")) + cmd /c 'ssh-keyscan web.sourceforge.net > "%USERPROFILE%\.ssh\known_hosts" 2>nul' + cmd /c "scp LxRunOffline-$(git describe --tags)-mingw.zip ddosolitary@web.sourceforge.net:/home/project-web/ddosolitary-builds/htdocs/LxRunOffline/ 2>&1" + if ($LASTEXITCODE -ne 0) { exit 1 } build-msvc: runs-on: windows-latest steps: @@ -57,23 +56,16 @@ jobs: if ($LASTEXITCODE -ne 0) { Exit 1 } - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') run: | + mkdir -Force ~\.ssh + [IO.File]::WriteAllBytes( ` + "$Env:USERPROFILE\.ssh\id_ed25519", ` + [Convert]::FromBase64String("${{ secrets.DEPLOYKEY }}")) + cmd /c 'ssh-keyscan web.sourceforge.net > "%USERPROFILE%\.ssh\known_hosts" 2>nul' $version = git describe --tags - $zip_name = "LxRunOffline-$version-msvc.zip" - curl.exe -fsS ` - -T $zip_name ` - -u ddosolitary:${{ secrets.BINTRAY_KEY }} ` - -H "X-Bintray-Package: default" ` - -H "X-Bintray-Version: default" ` - -H "X-Bintray-Publish: 1" ` - https://api.bintray.com/content/ddosolitary/dev-releases/LxRunOffline/$zip_name + cmd /c "scp LxRunOffline-$version-msvc.zip ddosolitary@web.sourceforge.net:/home/project-web/ddosolitary-builds/htdocs/LxRunOffline/ 2>&1" + if ($LASTEXITCODE -ne 0) { exit 1 } if (-not $version.Contains("-")) { cmake -DCOMPONENT=choco -DCMAKE_INSTALL_PREFIX="$PWD" -P cmake_install.cmake - $pkg_name = "lxrunoffline.$($version.Substring(1)).nupkg" - curl.exe -fsS ` - -T $pkg_name ` - -u ddosolitary:${{ secrets.BINTRAY_KEY }} ` - -H "X-Bintray-Package: default" ` - -H "X-Bintray-Version: default" ` - -H "X-Bintray-Publish: 1" ` - https://api.bintray.com/content/ddosolitary/dev-releases/LxRunOffline/$pkg_name + cmd /c "scp lxrunoffline.$($version.Substring(1)).nupkg ddosolitary@web.sourceforge.net:/home/project-web/ddosolitary-builds/htdocs/LxRunOffline/ 2>&1" + if ($LASTEXITCODE -ne 0) { exit 1 } } diff --git a/README.md b/README.md index 167b028..21a7c1e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Alipay You can install via Chocolatey `choco install lxrunoffline`, Scoop `scoop bucket add extras`, `scoop install lxrunoffline`, or download the binaries directly: - Latest releases: https://github.com/DDoSolitary/LxRunOffline/releases -- Development builds: https://dl.bintray.com/ddosolitary/dev-releases/LxRunOffline/ +- Development builds: https://ddosolitary-builds.sourceforge.io/LxRunOffline/ ### Shell extension