Skip to content

Commit

Permalink
switching to tag based build
Browse files Browse the repository at this point in the history
  • Loading branch information
val antonini committed Apr 25, 2024
1 parent 9dea85b commit 2437129
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ mono: none
dist: focal
dotnet: 6.0.101
os: linux
env:
global:
- PACKAGE_VERSION_RELEASE=1.1.0
- PACKAGE_VERSION_PRERELEASE=1.1.0-beta.$TRAVIS_BUILD_NUMBER

stages:
- build and test
- package prerelease
- package release
- package

jobs:
include:
Expand All @@ -20,13 +15,8 @@ jobs:
- dotnet restore
- dotnet build
- dotnet test AStar.Tests/AStar.Tests.csproj
- stage: package prerelease
if: branch = "prerelease"
- stage: package
if: tag =~ ^v
script:
- dotnet pack -c Release /p:PackageVersion=$PACKAGE_VERSION_PRERELEASE
- dotnet nuget push AStar/bin/Release/AStarLite.$PACKAGE_VERSION_PRERELEASE.nupkg -s https://www.nuget.org/api/v2/package -k $NUGET_API_KEY
- stage: package release
if: branch = "release"
script:
- dotnet pack -c Release /p:PackageVersion=$PACKAGE_VERSION_RELEASE
- dotnet nuget push AStar/bin/Release/AStarLite.$PACKAGE_VERSION_RELEASE.nupkg -s https://www.nuget.org/api/v2/package -k $NUGET_API_KEY
- dotnet pack -c Release /p:PackageVersion=${TRAVIS_TAG:1}
- dotnet nuget push AStar/bin/Release/AStarLite.${TRAVIS_TAG:1}.nupkg -s https://www.nuget.org/api/v2/package -k $NUGET_API_KEY

0 comments on commit 2437129

Please sign in to comment.