ci: rewrite to use scripts
This commit is contained in:
@@ -11,15 +11,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- template: azure/build.yml
|
- template: azure/build.yml
|
||||||
|
|
||||||
- job: Windows
|
- job: Windows (Non-deploy)
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
- template: azure/build.yml
|
- template: azure/build.yml
|
||||||
- script: echo deploy
|
|
||||||
# TODO: condition check for dev branch
|
- job: Windows (Deploy)
|
||||||
condition: |
|
pool:
|
||||||
|
vmImage: 'vs2017-win2016'
|
||||||
|
condition: |
|
||||||
and (
|
and (
|
||||||
succeeded(),
|
succeeded(),
|
||||||
eq(variables['Build.SourceBranch'], 'refs/heads/ci/azure')
|
eq(variables['Build.SourceBranch'], 'refs/heads/ci/azure')
|
||||||
)
|
)
|
||||||
|
steps:
|
||||||
|
- template: azure/build.yml
|
||||||
|
- template: azure/deploy.yml
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: DotNetCoreCLI@2
|
- script: dotnet restore -v minimal Discord.Net.sln
|
||||||
inputs:
|
displayName: Restore packages
|
||||||
command: restore
|
|
||||||
projects: 'Discord.Net.sln'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- script: dotnet build "Discord.Net.sln" --no-restore -v minimal -c $(buildConfiguration) /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
inputs:
|
displayName: Build projects
|
||||||
command: build
|
condition: succeeded()
|
||||||
projects: 'Discord.Net.sln'
|
|
||||||
configuration: $(buildConfiguration)
|
|
||||||
arguments: '/p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- script: dotnet test "test/Discord.Net.Tests/Discord.Net.Tests.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) --logger trx
|
||||||
|
# TODO: update this to support multiple tests
|
||||||
|
displayName: Test projects
|
||||||
|
condition: succeeded()
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
displayName: Publish test results
|
||||||
|
condition: succeededOrFailed()
|
||||||
inputs:
|
inputs:
|
||||||
command: test
|
testRunner: VSTest
|
||||||
projects: './test/**/*.csproj'
|
testResultsFiles: '**/*.trx'
|
||||||
configuration: $(buildConfiguration)
|
|
||||||
nobuild: True
|
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: DotNetCoreCLI@2
|
- script: |
|
||||||
|
dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
dotnet pack "src\Discord.Net.Rest\Discord.Net.Rest.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
dotnet pack "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
dotnet pack "src\Discord.Net.Commands\Discord.Net.Commands.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
dotnet pack "src\Discord.Net.Webhook\Discord.Net.Webhook.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
dotnet pack "src\Discord.Net.Providers.WS4Net\Discord.Net.Providers.WS4Net.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
dotnet pack "src\Discord.Net.Analyzers\Discord.Net.Analyzers.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "artifacts/" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
||||||
|
displayName: Pack projects
|
||||||
|
|
||||||
|
# TODO: build nuspec
|
||||||
|
|
||||||
|
- task: NuGetCommand@2
|
||||||
|
displayName: Push to NuGet
|
||||||
inputs:
|
inputs:
|
||||||
command: 'pack'
|
command: push
|
||||||
projects: 'Discord.Net.sln'
|
nuGetFeedType: external
|
||||||
configuration: $(buildConfiguration)
|
packagesToPush: 'artifacts/*.nupkg'
|
||||||
nobuild: True
|
|
||||||
arguments: '/p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)'
|
|
||||||
|
|
||||||
# TODO: build nuspec
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
|
|||||||
Reference in New Issue
Block a user