Skip to content

Commit bf174c8

Browse files
authored
ci(0.76): enable publishing of stable releases (#2310)
1 parent 4bae7e8 commit bf174c8

File tree

2 files changed

+2
-68
lines changed

2 files changed

+2
-68
lines changed

.ado/publish.yml

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -74,66 +74,3 @@ extends:
7474
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
7575

7676
- template: /.ado/templates/npm-publish.yml@self
77-
78-
# Set the git tag and push the version update back to Github
79-
80-
- template: .ado/templates/configure-git.yml@self
81-
82-
- task: CmdLine@2
83-
displayName: 'Tag and push to Github'
84-
inputs:
85-
script: node .ado/gitTagRelease.js
86-
env:
87-
BUILD_STAGINGDIRECTORY: $(Build.StagingDirectory)
88-
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
89-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
90-
githubAuthToken: $(githubAuthToken)
91-
condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'main'))
92-
93-
- job: RNMacOSInitNpmJSPublish
94-
displayName: NPM Publish beachball packages (e.g., react-native-macos-init)
95-
pool:
96-
name: cxeiss-ubuntu-20-04-large
97-
image: cxe-ubuntu-20-04-1es-pt
98-
os: linux
99-
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
100-
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
101-
templateContext:
102-
outputs:
103-
- output: pipelineArtifact
104-
targetPath: $(System.DefaultWorkingDirectory)
105-
artifactName: macos-init-npm-js-publish
106-
steps:
107-
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
108-
clean: true # whether to fetch clean each time
109-
# fetchDepth: 2 # the depth of commits to ask Git to fetch
110-
lfs: false # whether to download Git-LFS files
111-
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
112-
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
113-
114-
- template: .ado/templates/configure-git.yml@self
115-
116-
- task: CmdLine@2
117-
displayName: yarn install
118-
inputs:
119-
script: |
120-
cd packages/react-native-macos-init
121-
yarn install
122-
123-
- task: CmdLine@2
124-
displayName: Build react-native-macos-init
125-
inputs:
126-
script: |
127-
cd packages/react-native-macos-init
128-
yarn build
129-
130-
- task: CmdLine@2
131-
displayName: Code tested in other pipeline [test]
132-
inputs:
133-
script: echo "This code is tested as part of an integration test. See the 'Verify react-native-macos-init' task."
134-
135-
- task: CmdLine@2
136-
displayName: "Publish beachball packages to npmjs.org"
137-
inputs:
138-
script: |
139-
npx beachball publish --scope '!packages/react-native' --branch origin/$(Build.SourceBranchName) -n $(npmAuthToken) -yes -m "applying package updates ***NO_CI***" --access public

.ado/templates/npm-publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
# If this is a new stable branch, change `publishTag` to `latest` when going stable
3-
publishTag: 'next'
3+
publishTag: 'latest'
44

55
steps:
66
- script: |
@@ -17,10 +17,7 @@ steps:
1717
condition: ${{ ne(variables['publish_react_native_macos'], '1') }}
1818
1919
- script: |
20-
# TODO: Before we can change the line below to `yarn nx release --yes` on
21-
# `main`, we must first set up the pipeline for nightly builds. Stable
22-
# branches should be fine.
23-
yarn nx release --dry-run
20+
yarn nx release --yes
2421
env:
2522
GITHUB_TOKEN: $(githubAuthToken)
2623
NODE_AUTH_TOKEN: $(npmAuthToken)

0 commit comments

Comments
 (0)