@@ -21,8 +21,8 @@ variables:
21
21
value : production,externalfacing
22
22
23
23
jobs :
24
- - job : NPMPublishRNM
25
- displayName : NPM Publish React Native macOS
24
+ - job : RNGithubNpmJSPublish
25
+ displayName : NPM Publish React-native-macos
26
26
pool :
27
27
vmImage : $(VmImageApple)
28
28
variables :
@@ -38,74 +38,35 @@ jobs:
38
38
submodules : recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
39
39
persistCredentials : true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
40
40
41
- - template : templates/apple-tools-setup.yml
42
-
43
- - template : templates/apple-install-dependencies.yml
44
-
45
- - template : templates/apple-release-setup.yml
46
-
47
- - task : CmdLine@2
48
- displayName : Set next version if release branch
49
- inputs :
50
- script : |
51
- VERSION=$(node .ado/get-next-semver-version.js)
52
- echo "Set version to: $VERSION"
53
- condition : and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
54
-
55
- - task : CmdLine@2
56
- displayName : Set latest tag if latest stable branch
57
- inputs :
58
- script : |
59
- LATEST=true
60
- echo "Set latest to: $LATEST"
61
- condition : and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
62
-
63
- - task : CmdLine@2
64
- displayName : Set release type to 'nightly'
65
- inputs :
66
- script : |
67
- RELEASE_TYPE=nightly
68
- echo "Set release type to: $RELEASE_TYPE"
69
- condition : and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
70
-
71
- - task : CmdLine@2
72
- displayName : Set release type to 'release'
73
- inputs :
74
- script : |
75
- RELEASE_TYPE=release
76
- echo "Set release type to: $RELEASE_TYPE"
77
- condition : and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
78
-
79
- - task : CmdLine@2
80
- displayName : Prepare package for release
81
- inputs :
82
- script : |
83
- if [[ -z "$VERSION" ]]; then
84
- VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -1)
85
- echo "Using the version from the package.json: $VERSION"
86
- fi
87
- node ./scripts/prepare-package-for-release.js -v "$VERSION" -l $LATEST
88
- condition : and(succeeded(), ne(variables['Build.TargetBranch'], 'refs/heads/main'))
41
+ - ${{ if eq(variables['isMain'], true) }} :
42
+ - template : templates/apple-job-publish.yml
43
+ parameters :
44
+ build_type : nightly
45
+ - ${{ elseif eq(variables['isReleaseBranch'], true) }} :
46
+ - template : templates/apple-job-publish.yml
47
+ parameters :
48
+ build_type : release
49
+ - ${{ else }} :
50
+ - task : CmdLine@2
51
+ displayName : Unknown branch, skipping publish
52
+ inputs :
53
+ script : |
54
+ echo "Skipping publish for branch $(Build.SourceBranchName)"
55
+ exit 1
89
56
90
57
- task : AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
91
58
displayName : 📒 Generate Manifest
92
59
inputs :
93
60
BuildDropPath : $(System.DefaultWorkingDirectory)
94
61
95
- - task : CmdLine@2
96
- displayName : NPM Publish
97
- inputs :
98
- script : |
99
- node ./scripts/publish-npm.js --$RELEASE_TYPE
100
-
101
62
- task : PublishPipelineArtifact@1
102
63
displayName : 📒 Publish Manifest
103
64
inputs :
104
65
artifactName : SBom-RNGithubNpmJSPublish-$(System.JobAttempt)
105
66
targetPath : $(System.DefaultWorkingDirectory)/_manifest
106
67
107
68
- job : RNMacOSInitNpmJSPublish
108
- displayName : react-native-macos-init Publish to npmjs.org
69
+ displayName : NPM Publish react-native-macos-init
109
70
pool : cxeiss-ubuntu-20-04-large
110
71
timeoutInMinutes : 90 # how long to run the job before automatically cancelling
111
72
cancelTimeoutInMinutes : 5 # how much time to give 'run always even if cancelled tasks' before killing them
120
81
submodules : recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
121
82
persistCredentials : true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
122
83
123
- - template : templates/apple-tools-setup.yml
124
-
125
84
- template : templates/apple-install-dependencies.yml
126
85
127
86
- template : templates/apple-release-setup.yml
0 commit comments