From dff3b47e4b3db465797ef1326ee7aa02d5d89ca5 Mon Sep 17 00:00:00 2001 From: David Driscoll Date: Mon, 7 Dec 2020 00:32:06 -0500 Subject: [PATCH] removed azure pipelines support --- .build/Solution.cs | 21 ------ .github/workflows/publish-nuget.yml | 57 ++++++++++++++ azure-pipelines.nuke.yml | 29 ------- azure-pipelines.yml | 113 ---------------------------- 4 files changed, 57 insertions(+), 163 deletions(-) create mode 100644 .github/workflows/publish-nuget.yml delete mode 100644 azure-pipelines.nuke.yml delete mode 100644 azure-pipelines.yml diff --git a/.build/Solution.cs b/.build/Solution.cs index c13a59a99..38db710d9 100644 --- a/.build/Solution.cs +++ b/.build/Solution.cs @@ -6,27 +6,6 @@ using Rocket.Surgery.Nuke.DotNetCore; using Rocket.Surgery.Nuke.GithubActions; -[AzurePipelinesSteps( - AutoGenerate = false, - InvokeTargets = new[] { nameof(Default) }, - NonEntryTargets = new[] - { - nameof(ICIEnvironment.CIEnvironment), - nameof(ITriggerCodeCoverageReports.Trigger_Code_Coverage_Reports), - nameof(ITriggerCodeCoverageReports.Generate_Code_Coverage_Report_Cobertura), - nameof(IGenerateCodeCoverageBadges.Generate_Code_Coverage_Badges), - nameof(IGenerateCodeCoverageReport.Generate_Code_Coverage_Report), - nameof(IGenerateCodeCoverageSummary.Generate_Code_Coverage_Summary), - nameof(Default) - }, - ExcludedTargets = new[] - { nameof(ICanClean.Clean), nameof(ICanRestoreWithDotNetCore.Restore), nameof(ICanRestoreWithDotNetCore.DotnetToolRestore) }, - Parameters = new[] - { - nameof(IHaveCodeCoverage.CoverageDirectory), nameof(IHaveOutputArtifacts.ArtifactsDirectory), nameof(Verbosity), - nameof(IHaveConfiguration.Configuration) - } -)] [GitHubActionsSteps("ci", GitHubActionsImage.MacOsLatest, GitHubActionsImage.WindowsLatest, GitHubActionsImage.UbuntuLatest, AutoGenerate = false, On = new[] { GitHubActionsTrigger.Push }, diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml new file mode 100644 index 000000000..4a0c9259a --- /dev/null +++ b/.github/workflows/publish-nuget.yml @@ -0,0 +1,57 @@ +name: Publish Nuget + +on: + workflow_run: + workflows: ['ci'] + types: + - completed + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: nuget/setup-nuget@v1 + with: + nuget-version: '5.x' + + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: ci.yml + run_id: ${{ github.event.id }} + name: nuget + + # - uses: actions/download-artifact@v2 + # with: + # name: nuget + + - name: nuget.org + # continue-on-error: true + if: startsWith(github.ref, 'refs/tags/v') + env: + ApiKey: ${{ secrets.RSG_NUGET_API_KEY }} + shell: pwsh + run: | + dotnet nuget push **/*.nupkg --skip-duplicate --api-key $ENV:ApiKey --source nuget.org + + - name: dev.azure.com + # continue-on-error: true + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + env: + ApiKey: ${{ secrets.RSG_AZURE_DEVOPS }} + shell: pwsh + run: | + dotnet nuget add source https://rocketsurgeonsguild.pkgs.visualstudio.com/Libraries/_packaging/Packages/nuget/v3/index.json --store-password-in-clear-text --name LibrariesPackages --username azuredevops --password $ENV:ApiKey + dotnet nuget push **/*.nupkg --skip-duplicate --api-key azuredevops --source LibrariesPackages + + - name: preview.dev.azure.com + # continue-on-error: true + if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' + env: + ApiKey: ${{ secrets.RSG_AZURE_DEVOPS }} + shell: pwsh + run: | + dotnet nuget add source https://rocketsurgeonsguild.pkgs.visualstudio.com/Libraries/_packaging/Preview/nuget/v3/index.json --store-password-in-clear-text --name LibrariesPreview --username azuredevops --password $ENV:ApiKey + dotnet nuget push **/*.nupkg --skip-duplicate --api-key azuredevops --source LibrariesPreview diff --git a/azure-pipelines.nuke.yml b/azure-pipelines.nuke.yml deleted file mode 100644 index 318004721..000000000 --- a/azure-pipelines.nuke.yml +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# -# -# This code was generated. -# -# - To turn off auto-generation set: -# -# [AzurePipelinesSteps (AutoGenerate = false)] -# -# - To trigger manual generation invoke: -# -# nuke --generate-configuration AzurePipelines --host AzurePipelines -# -# -# ------------------------------------------------------------------------------ - -# -parameters: - Artifacts: '' - Coverage: '' - Configuration: 'Release' - Verbosity: 'Normal' -steps: - - pwsh: ./build.ps1 Build --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}' - displayName: '⚙ Build' - - pwsh: ./build.ps1 Test Trigger_Code_Coverage_Reports Generate_Code_Coverage_Report_Cobertura Generate_Code_Coverage_Badges Generate_Code_Coverage_Summary Generate_Code_Coverage_Report --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}' - displayName: '🚦 Test' - - pwsh: ./build.ps1 Pack --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}' - displayName: '📦 Pack' diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 21620b378..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,113 +0,0 @@ -trigger: - batch: true - branches: - include: - - master - - next - - refs/tags/* - paths: - exclude: - - '**/*.md' - - '.appveyor.yml' - - '.codecov.yml' - - 'GitVersion.yml' - - 'GitReleaseManager.yaml' - - .vscode/* - - .git* - - .editorconfig - - .nuke - - LICENSE - -pr: - autoCancel: true - branches: - include: - - master - - next - -resources: - repositories: - - repository: rsg - type: github - name: RocketSurgeonsGuild/AzureDevopsTemplates - ref: refs/tags/v0.13.0 - endpoint: github - -variables: - - name: CONFIGURATION - value: Release - - name: VERBOSITY - value: Normal - - name: COVERAGE - value: '$(Agent.BuildDirectory)/c' - - name: ARTIFACTS - value: $(Build.ArtifactStagingDirectory) - - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE - value: 'true' - - name: CodeCovToken - value: 'c1a9be93-3c6d-4b4c-9acc-26d4a180f06f' - - group: rsg-bot - -jobs: - - template: jobs/publish-release.yml@rsg - parameters: - GitHubPackages: true - GitHubAuthVariableGroup: rsg-bot - PublishNuGetPackagesFromArtifact: 'NuGet - Windows' - - - job: Build - dependsOn: - variables: - - group: rsg-bot - strategy: - matrix: - Windows: - BuildName: 'Windows' - ImageName: 'windows-latest' - Linux: - BuildName: 'Linux' - ImageName: 'ubuntu-latest' - macOS: - BuildName: 'macOS' - ImageName: 'macOS-latest' - pool: - vmImage: $(ImageName) - steps: - - template: support/mono.yml@rsg - # - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}: - # - template: support/download-release-notes.yml@rsg - - template: support/install-dotnet.yml@rsg - parameters: - DotNetSdk: - - '2.1.x' - - '3.1.x' - - '5.0.x' - - - task: DotNetCoreCLI@2 - displayName: 'dotnet tool restore' - inputs: - command: custom - custom: tool - arguments: 'restore' - - - task: DotNetCoreCLI@2 - displayName: 'dotnet restore' - inputs: - command: restore - feedsToUse: config - nugetConfigPath: NuGet.config - verbosityRestore: Minimal - - - template: ./azure-pipelines.nuke.yml - parameters: - Artifacts: $(Artifacts) - Configuration: $(Configuration) - Coverage: $(Coverage) - - - template: support/publish-artifacts.yml@rsg - parameters: - Artifacts: $(Artifacts) - Configuration: $(Configuration) - Coverage: $(Coverage) - Postfix: ' - $(BuildName)' - PublishVSTest: true