Skip to content

Commit

Permalink
ci(0.76): Enable publishing of stable releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Dec 6, 2024
1 parent dde6d80 commit 01a86f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 68 deletions.
63 changes: 0 additions & 63 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,66 +74,3 @@ extends:
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- template: /.ado/templates/npm-publish.yml@self

# Set the git tag and push the version update back to Github

- template: .ado/templates/configure-git.yml@self

- task: CmdLine@2
displayName: 'Tag and push to Github'
inputs:
script: node .ado/gitTagRelease.js
env:
BUILD_STAGINGDIRECTORY: $(Build.StagingDirectory)
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
githubAuthToken: $(githubAuthToken)
condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'main'))

- job: RNMacOSInitNpmJSPublish
displayName: NPM Publish beachball packages (e.g., react-native-macos-init)
pool:
name: cxeiss-ubuntu-20-04-large
image: cxe-ubuntu-20-04-1es-pt
os: linux
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)
artifactName: macos-init-npm-js-publish
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
# fetchDepth: 2 # the depth of commits to ask Git to fetch
lfs: false # whether to download Git-LFS files
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- template: .ado/templates/configure-git.yml@self

- task: CmdLine@2
displayName: yarn install
inputs:
script: |
cd packages/react-native-macos-init
yarn install
- task: CmdLine@2
displayName: Build react-native-macos-init
inputs:
script: |
cd packages/react-native-macos-init
yarn build
- task: CmdLine@2
displayName: Code tested in other pipeline [test]
inputs:
script: echo "This code is tested as part of an integration test. See the 'Verify react-native-macos-init' task."

- task: CmdLine@2
displayName: "Publish beachball packages to npmjs.org"
inputs:
script: |
npx beachball publish --scope '!packages/react-native' --branch origin/$(Build.SourceBranchName) -n $(npmAuthToken) -yes -m "applying package updates ***NO_CI***" --access public
7 changes: 2 additions & 5 deletions .ado/templates/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
# If this is a new stable branch, change `publishTag` to `latest` when going stable
publishTag: 'next'
publishTag: 'latest'

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

0 comments on commit 01a86f9

Please sign in to comment.