1
- # It is expected that a `latestStableBranch` variable is set in the pipeline's settings:
2
- # https://dev.azure.com/office/ISS/_apps/hub/ms.vss-build-web.ci-designer-hub?pipelineId=18541
3
-
4
1
# This file defines the build steps to publish a release
5
2
name : $(Date:yyyyMMdd).$(Rev:.r)
6
3
9
6
branches :
10
7
include :
11
8
- main
12
- - 0.68-stable
13
- - 0.71-stable
9
+ - ' *-stable'
14
10
paths :
15
11
exclude :
16
12
- package.json
@@ -25,8 +21,8 @@ variables:
25
21
value : production,externalfacing
26
22
27
23
jobs :
28
- - job : RNGithubNpmJSPublish
29
- displayName : React-Native GitHub Publish to npmjs.org
24
+ - job : NPMPublishRNM
25
+ displayName : NPM Publish React Native macOS
30
26
pool :
31
27
vmImage : $(VmImageApple)
32
28
variables :
@@ -56,22 +52,31 @@ jobs:
56
52
script : |
57
53
VERSION=$(node .ado/get-next-semver-version.js)
58
54
echo "Set version to: $VERSION"
59
- condition : and(succeeded(), ne(variables['Build.SourceBranchName'], 'main'))
55
+ condition : and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
56
+
57
+ - task : CmdLine@2
58
+ displayName : Set latest tag if latest stable branch
59
+ inputs :
60
+ script : |
61
+ LATEST=true
62
+ echo "Set latest to: $LATEST"
63
+ condition : and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
60
64
61
65
- task : CmdLine@2
62
- displayName : Set release type
66
+ displayName : Set release type to 'nightly'
63
67
inputs :
64
68
script : |
65
- RELEASE_TYPE=$(node .ado/get-next-release-type.js)
69
+ RELEASE_TYPE=nightly
66
70
echo "Set release type to: $RELEASE_TYPE"
71
+ condition : and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
67
72
68
73
- task : CmdLine@2
69
- displayName : Set latest tag if latest stable branch
74
+ displayName : Set release type to 'release'
70
75
inputs :
71
76
script : |
72
- LATEST=true
73
- echo "Set latest to: $LATEST "
74
- condition : eq( variables['Build.SourceBranchName '], $(latest_stable_branch ))
77
+ RELEASE_TYPE=release
78
+ echo "Set release type to: $RELEASE_TYPE "
79
+ condition : and(succeeded(), ne( variables['Build.SourceBranch '], 'refs/heads/main' ))
75
80
76
81
- task : CmdLine@2
77
82
displayName : Prepare package for release
82
87
echo "Using the version from the package.json: $VERSION"
83
88
fi
84
89
node ./scripts/prepare-package-for-release.js -v "$VERSION" -l $LATEST
85
- condition : and(succeeded(), ne(variables['Build.SourceBranchName '], 'main'))
90
+ condition : and(succeeded(), ne(variables['Build.TargetBranch '], 'refs/heads/ main'))
86
91
87
92
- task : AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
88
93
displayName : 📒 Generate Manifest
0 commit comments