diff --git a/.travis.yml b/.travis.yml index b371dad..a6ea577 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,21 +12,15 @@ mono: none env: global: - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE=: true + - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 script: - - dotnet restore - - dotnet build -c Release - - cd ./Nexogen.Libraries.Metrics.UnitTests && dotnet test && cd .. - - dotnet pack ./Nexogen.Libraries.Metrics -c Release --version-suffix $TRAVIS_BUILD_NUMBER - - dotnet pack ./Nexogen.Libraries.Metrics.Extensions -c Release --version-suffix $TRAVIS_BUILD_NUMBER - - dotnet pack ./Nexogen.Libraries.Metrics.Prometheus -c Release --version-suffix $TRAVIS_BUILD_NUMBER - - dotnet pack ./Nexogen.Libraries.Metrics.Prometheus.AspCore -c Release --version-suffix $TRAVIS_BUILD_NUMBER - - dotnet pack ./Nexogen.Libraries.Metrics.Prometheus.PushGateway -c Release --version-suffix $TRAVIS_BUILD_NUMBER + - chmod +x ./build.sh && ./build.sh -# deploy: -# provider: script -# script: dotnet nuget push **/*.nupkg -s https://nuget.org -k $NUGET_API_KEY -# on: -# branch: master \ No newline at end of file +deploy: + skip_cleanup: true + provider: script + script: chmod +x ./deploy.sh && ./deploy.sh $NUGET_API_KEY $TRAVIS_BUILD_NUMBER + on: + branch: master \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..2d9a86d --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +#exit if any command fails +set -e + +dotnet restore +dotnet build -c Release +cd ./Nexogen.Libraries.Metrics.UnitTests && dotnet test && cd .. \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..39c306c --- /dev/null +++ b/deploy.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +#exit if any command fails +set -e + +NUGET_API_KEY=$1 +NUGET_VERSION_SUFFIX=$2 + +dotnet pack ./Nexogen.Libraries.Metrics -c Release --version-suffix $NUGET_VERSION_SUFFIX +dotnet pack ./Nexogen.Libraries.Metrics.Extensions -c Release --version-suffix $NUGET_VERSION_SUFFIX +dotnet pack ./Nexogen.Libraries.Metrics.Prometheus -c Release --version-suffix $NUGET_VERSION_SUFFIX +dotnet pack ./Nexogen.Libraries.Metrics.Prometheus.AspCore -c Release --version-suffix $NUGET_VERSION_SUFFIX +dotnet pack ./Nexogen.Libraries.Metrics.Prometheus.PushGateway -c Release --version-suffix $NUGET_VERSION_SUFFIX +dotnet nuget push **/*.nupkg -s https://nuget.org -k $NUGET_API_KEY \ No newline at end of file