Skip to content

Commit

Permalink
Update bintray upload script.
Browse files Browse the repository at this point in the history
  • Loading branch information
DDoSolitary authored Aug 7, 2020
1 parent 9e3a1a2 commit 93a24a0
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ jobs:
cmake -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release . &&
make package -j"
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 }} `
https://api.bintray.com/content/ddosolitary/dev-releases/default/default/LxRunOffline/$zip_name
curl.exe -fsS -X POST `
-u ddosolitary:${{ secrets.BINTRAY_KEY }} `
https://api.bintray.com/content/ddosolitary/dev-releases/default/default/publish
-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
build-msvc:
runs-on: windows-latest
steps:
Expand All @@ -49,20 +51,25 @@ jobs:
-DBUILD_CHOCO_PKG=ON
nmake package
if ($LASTEXITCODE -ne 0) { Exit 1 }
- if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
run: |
$version = git describe --tags
$zip_name = "LxRunOffline-$version-msvc.zip"
curl.exe -fsS `
-T $zip_name `
-u ddosolitary:${{ secrets.BINTRAY_KEY }} `
https://api.bintray.com/content/ddosolitary/dev-releases/default/default/LxRunOffline/$zip_name
-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
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 }} `
https://api.bintray.com/content/ddosolitary/dev-releases/default/default/LxRunOffline/$pkg_name
-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
}
curl.exe -fsS -X POST `
-u ddosolitary:${{ secrets.BINTRAY_KEY }} `
https://api.bintray.com/content/ddosolitary/dev-releases/default/default/publish

0 comments on commit 93a24a0

Please sign in to comment.