Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create RNW NuGet Release yml from classic pipeline #14244

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .ado/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: RNW NuGet Release $(Date:yyyyMMdd).$(Rev:r)

trigger: none

resources:
pipelines:
- pipeline: 'Publish'
project: 'ReactNative'
source: 'Publish'
trigger:
branches:
include:
- -1espublish
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows
customBuildTags:
- ES365AIMigrationTooling-Release
stages:
- stage: PushToPrivateAdoStage
displayName: ADO - react-native
jobs:
- job: PushPackages
displayName: Push packages
condition: succeeded()
timeoutInMinutes: 0
templateContext:
inputs:
- input: pipelineArtifact
pipeline: 'Publish'
artifactName: 'ReactWindows-final-nuget'
targetPath: '$(Pipeline.Workspace)/ReactWindows-final-nuget'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet '
- task: NuGetAuthenticate@1
displayName: NuGet Authenticate
inputs:
nuGetServiceConnections: ms/react-native ADO Feed
- task: CmdLine@2
displayName: NuGet push (react-native)
inputs:
script: nuget.exe push *.nupkg -ApiKey AzureArtifacts -Source https://pkgs.dev.azure.com/ms/_packaging/react-native/nuget/v3/index.json -NonInteractive -Verbosity Detailed -SkipDuplicate -NoSymbols
workingDirectory: $(System.DefaultWorkingDirectory)/Publish/ReactWindows-final-nuget
- stage: PushToPublicAdoStage
displayName: ADO - react-native-public
jobs:
- job: PushPackages
displayName: Push packages
condition: succeeded()
timeoutInMinutes: 0
templateContext:
inputs:
- input: pipelineArtifact
pipeline: 'Publish'
artifactName: 'ReactWindows-final-nuget'
targetPath: '$(Pipeline.Workspace)/ReactWindows-final-nuget'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet '
- task: NuGetAuthenticate@1
displayName: NuGet Authenticate
inputs:
nuGetServiceConnections: ms/react-native-public ADO Feed
- task: CmdLine@2
displayName: NuGet push (react-native-public)
inputs:
script: nuget.exe push *.nupkg -ApiKey AzureArtifacts -Source https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json -NonInteractive -Verbosity Detailed -SkipDuplicate -NoSymbols
workingDirectory: $(System.DefaultWorkingDirectory)/Publish/ReactWindows-final-nuget
- stage: PushToNuGetStage
displayName: nuget.org - Push nuget packages
variables:
- group: RNW Secrets
jobs:
- job: PushPackages
displayName: Push packages
condition: and(succeeded(), endsWith(variables['Build.SourceBranchName'],'-stable'))
timeoutInMinutes: 0
templateContext:
inputs:
- input: pipelineArtifact
pipeline: 'Publish'
artifactName: 'ReactWindows-final-nuget'
targetPath: '$(Pipeline.Workspace)/ReactWindows-final-nuget'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet '
- task: CmdLine@2
displayName: NuGet SetApiKey (nuget.org)
inputs:
script: nuget.exe SetApiKey $(nugetorg-apiKey-push)
workingDirectory: $(System.DefaultWorkingDirectory)/Publish/ReactWindows-final-nuget
- task: CmdLine@2
displayName: NuGet push (nuget.org)
inputs:
script: nuget.exe push .\Microsoft.ReactNative.*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbol -NonInteractive -Verbosity Detailed
workingDirectory: $(System.DefaultWorkingDirectory)/Publish/ReactWindows-final-nuget