[CI] Retire azure pipelines (#2877)
* Delete azure-pipelines.yml * Update dotnet.yml * Delete azure directory
This commit is contained in:
5
.github/workflows/dotnet.yml
vendored
5
.github/workflows/dotnet.yml
vendored
@@ -116,6 +116,7 @@ jobs:
|
|||||||
nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json
|
nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json
|
||||||
nuget setApiKey ${{ secrets.NIGHTLY_FEED_API_KEY }} -Source ${{ vars.NIGHTLY_FEED }}
|
nuget setApiKey ${{ secrets.NIGHTLY_FEED_API_KEY }} -Source ${{ vars.NIGHTLY_FEED }}
|
||||||
nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source ${{ env.REPOSITORY_URL }}
|
nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source ${{ env.REPOSITORY_URL }}
|
||||||
|
nuget setApiKey ${{ secrets.MYGET_API_KEY }} -Source https://www.myget.org/F/discord-net/api/v2/package
|
||||||
|
|
||||||
- name: Push Nightly
|
- name: Push Nightly
|
||||||
if: vars.PUSH_NIGHTLY == 'true'
|
if: vars.PUSH_NIGHTLY == 'true'
|
||||||
@@ -125,6 +126,10 @@ jobs:
|
|||||||
if: vars.PUSH_NIGHTLY == 'true'
|
if: vars.PUSH_NIGHTLY == 'true'
|
||||||
run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source ${{ env.REPOSITORY_URL }}
|
run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source ${{ env.REPOSITORY_URL }}
|
||||||
|
|
||||||
|
- name: Push Nightly to MyGet
|
||||||
|
if: vars.PUSH_MYGET == 'true'
|
||||||
|
run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source https://www.myget.org/F/discord-net/api/v2/package
|
||||||
|
|
||||||
- name: Push Release
|
- name: Push Release
|
||||||
if: env.IsTagBuild == 'true' && vars.PUSH_NUGET == 'true'
|
if: env.IsTagBuild == 'true' && vars.PUSH_NUGET == 'true'
|
||||||
run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source https://api.nuget.org/v3/index.json
|
run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source https://api.nuget.org/v3/index.json
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
variables:
|
|
||||||
buildConfiguration: Release
|
|
||||||
buildTag: $[ startsWith(variables['Build.SourceBranch'], 'refs/tags') ]
|
|
||||||
buildNumber: $[ variables['Build.BuildNumber'] ]
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
tags:
|
|
||||||
include:
|
|
||||||
- '*'
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: Linux
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
steps:
|
|
||||||
- template: azure/build.yml
|
|
||||||
|
|
||||||
- job: Windows_build
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-latest'
|
|
||||||
condition: ne(variables['Build.SourceBranch'], 'refs/heads/dev')
|
|
||||||
steps:
|
|
||||||
- template: azure/build.yml
|
|
||||||
|
|
||||||
- job: Windows_deploy
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-latest'
|
|
||||||
condition: |
|
|
||||||
and (
|
|
||||||
succeeded(),
|
|
||||||
or (
|
|
||||||
eq(variables['Build.SourceBranch'], 'refs/heads/dev'),
|
|
||||||
eq(variables['buildTag'], True)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
steps:
|
|
||||||
- template: azure/build.yml
|
|
||||||
- template: azure/deploy.yml
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
steps:
|
|
||||||
- task: UseDotNet@2
|
|
||||||
displayName: 'Use .NET Core sdk'
|
|
||||||
inputs:
|
|
||||||
packageType: 'sdk'
|
|
||||||
version: '6.0.x'
|
|
||||||
includePreviewVersions: true
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
inputs:
|
|
||||||
command: 'restore'
|
|
||||||
projects: 'Discord.Net.sln'
|
|
||||||
feedsToUse: 'select'
|
|
||||||
verbosityRestore: 'Minimal'
|
|
||||||
displayName: Restore packages
|
|
||||||
|
|
||||||
- script: dotnet build "Discord.Net.sln" --no-restore -v minimal -c $(buildConfiguration) /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
|
||||||
displayName: Build projects
|
|
||||||
|
|
||||||
- script: dotnet test "test/Discord.Net.Tests.Unit/Discord.Net.Tests.Unit.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) --logger trx
|
|
||||||
displayName: Unit Tests
|
|
||||||
|
|
||||||
- script: dotnet test "test/Discord.Net.Analyzers.Tests/Discord.Net.Analyzers.Tests.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) --logger trx
|
|
||||||
displayName: Analyzer Tests
|
|
||||||
|
|
||||||
# - script: dotnet test "test/Discord.Net.Tests.Integration/Discord.Net.Tests.Integration.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) --logger trx
|
|
||||||
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: Publish test results
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
inputs:
|
|
||||||
testRunner: VSTest
|
|
||||||
testResultsFiles: '**/*.trx'
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /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 "$(Build.ArtifactStagingDirectory)" /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 "$(Build.ArtifactStagingDirectory)" /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 "$(Build.ArtifactStagingDirectory)" /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 "$(Build.ArtifactStagingDirectory)" /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 "$(Build.ArtifactStagingDirectory)" /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 "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
|
||||||
dotnet pack "src\Discord.Net.Interactions\Discord.Net.Interactions.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
|
||||||
dotnet pack "experiment\Discord.Net.BuildOverrides\Discord.Net.BuildOverrides.csproj" --no-restore --no-build -v minimal -c $(buildConfiguration) -o "$(Build.ArtifactStagingDirectory)" /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
|
|
||||||
displayName: Pack projects
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: Download and Cache Nuget.exe
|
|
||||||
inputs:
|
|
||||||
versionSpec: 6.4.0
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: Pack metapackage (release mode)
|
|
||||||
condition: eq(variables['buildTag'], True)
|
|
||||||
inputs:
|
|
||||||
command: 'pack'
|
|
||||||
packagesToPack: 'src/Discord.Net/Discord.Net.nuspec'
|
|
||||||
versioningScheme: 'off'
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: Pack metapackage
|
|
||||||
condition: eq(variables['buildTag'], False)
|
|
||||||
inputs:
|
|
||||||
command: 'pack'
|
|
||||||
packagesToPack: 'src/Discord.Net/Discord.Net.nuspec'
|
|
||||||
versioningScheme: 'off'
|
|
||||||
buildProperties: 'suffix=-$(buildNumber)'
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: Push to NuGet
|
|
||||||
inputs:
|
|
||||||
command: push
|
|
||||||
nuGetFeedType: external
|
|
||||||
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
|
|
||||||
publishFeedCredentials: myget-discord
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
ECHO clone docs-static
|
|
||||||
git clone git@github.com:discord-net/docs-static.git || EXIT /B 1
|
|
||||||
|
|
||||||
ECHO remove old 'latest'
|
|
||||||
ECHO Y | RMDIR /S docs-static\latest || EXIT /B 1
|
|
||||||
|
|
||||||
ECHO build docs
|
|
||||||
docfx.console\tools\docfx.exe docs/docfx.json -o docs-staging || EXIT /B 1
|
|
||||||
ROBOCOPY docs-staging\_site docs-static\latest /MIR
|
|
||||||
|
|
||||||
ECHO commit and deploy
|
|
||||||
git config --global user.name "Discord.Net CI Robot" && git config --global user.email "robot@foxbot.me"
|
|
||||||
git -C docs-static add -A || EXIT /B 1
|
|
||||||
git -C docs-static commit -m "[ci deploy] %date% %time%: %Build.BuildId%" || EXIT /B 1
|
|
||||||
git -C docs-static push --force || EXIT /B 1
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
steps:
|
|
||||||
- task: InstallSSHKey@0
|
|
||||||
displayName: Install deploy key for docs
|
|
||||||
inputs:
|
|
||||||
knownHostsEntry: '|1|gFD+Dvd+09xvjlKReWSg3wE7q1A=|WJnD0RZ5H4HX5U0nA4Kt+R5yf+w= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
|
|
||||||
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN1oXiGqKblqfO+vr3cMLSiV6paD5BT+2RXfeCpVkRWSFCB7dfP2m1osJSBqqoCHvJGfbX1brGa+3fnmBgbqQ9vl1NkAmdjHYz4yfTKAt6KShYKXmPpTWBfbAqO2DUzTfTJ18XxNutK931vbWRtOjAMt7Aohw0FYm541QPr2IHIabTvVTPujVExHnMTB9cyKa8xzMD9W3zRLXJbhwOi0LtpgxX6OC/HpwdWod6TfxKdnkPMmVCOo7GTJITyd1GEFg+eNShBIaAZ557nAr8rm2ybEqYvhqFQI0cYMXbfr934yPoNN5yONE1PxDarr1T3GE3ZCWQw2Rc9CAKxrMTez7h
|
|
||||||
sshKeySecureFile: docs-static_rsa
|
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: Install DocFx
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
arguments: install docfx.console -ExcludeVersion
|
|
||||||
|
|
||||||
- script: azure/docs.bat
|
|
||||||
displayName: Build and deploy docs
|
|
||||||
Reference in New Issue
Block a user