Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (71 sloc) 2.6 KB
trigger:
- master
pr: none
variables:
packageArtifactName: packages
stages:
- stage: build
jobs:
- job:
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: ./fake.sh run build.fsx --target Changelog
displayName: Generate changelog
- script: dotnet build --configuration $(buildConfiguration) -p:Version=$(packageVersion)
displayName: 'dotnet build $(buildConfiguration)'
- script: dotnet pack --no-build --no-restore --configuration $(buildConfiguration) -p:Version=$(packageVersion)
displayName: 'dotnet pack'
- script: dotnet run --project src/DotNetDelice
displayName: Smoke test and example run
- publish: $(Build.SourcesDirectory)/.nupkg
displayName: Publish artifacts
artifact: $(packageArtifactName)
- stage: release
jobs:
- deployment: NuGet
displayName: Publish tool to NuGet
pool:
vmImage: 'ubuntu-latest'
environment: nuget
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: $(packageArtifactName)
- task: NuGetCommand@2
displayName: 'nuget push'
inputs:
command: push
nuGetFeedType: external
packagesToPush: $(Pipeline.Workspace)/$(packageArtifactName)/*.nupkg
publishFeedCredentials: 'NuGet - dotnet-delice'
- deployment: GitHub
displayName: Create GitHub release
pool:
vmImage: 'ubuntu-latest'
environment: github
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: $(packageArtifactName)
- script: |
pv=$(ls $(Pipeline.Workspace)/$(packageArtifactName)/*.nupkg | sed 's/.*\/dotnet-delice\.\([0-9\.]*\.[0-9\.]*\.[0-9\.]*\)\..*/\1/'g)
echo "##vso[task.setvariable variable=packageVersion]$pv"
displayName: Get package version
- task: GitHubRelease@0
displayName: 'Tag and release to GitHub'
inputs:
gitHubConnection: 'GitHub - dotnet-delice'
repositoryName: 'aaronpowell/dotnet-delice'
tagSource: manual
tag: '$(packageVersion)'
title: 'Release $(packageVersion)'
releaseNotesSource: file
releaseNotesFile: $(Pipeline.Workspace)/$(packageArtifactName)/changelog.md
assets: $(Pipeline.Workspace)/$(packageArtifactName)/*.nupkg
You can’t perform that action at this time.