Skip to content

Update scripts to publish react-native-macos-init #294

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

Merged
merged 6 commits into from
Apr 4, 2020
Merged
Show file tree
Hide file tree
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
35 changes: 35 additions & 0 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,41 @@ jobs:
command: 'publish'
publishEndpoint: 'npmjs'

- job: RNMacOSInitNpmJSPublish
displayName: react-native-macos-init Publish to npmjs.org
pool:
vmImage: vs2017-win2016
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
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

- task: CmdLine@2
displayName: yarn install
inputs:
script: |
cd packages/react-native-macos-init
yarn install

- task: CmdLine@2
displayName: yarn build
inputs:
script: |
cd packages/react-native-macos-init
yarn build

- task: CmdLine@2
displayName: "Publish react-native-macos-init to npmjs.org"
inputs:
script: |
cd packages/react-native-macos-init
npx --no-install beachball publish --branch origin/$(Build.SourceBranchName) -n $(npmAuthToken) -yes -m "applying package updates ***NO_CI***" --access public

- job: RNGithubOfficePublish
displayName: React-Native GitHub Publish to Office
pool:
Expand Down
1 change: 1 addition & 0 deletions .ado/versionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function updateVersionsInFiles() {
pkgJson.version = releaseVersion;
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2));
console.log(`Updating package.json to version ${releaseVersion}`);

return {releaseVersion, branchVersionSuffix};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "major",
"comment": "Update scripts to publish react-native-macos-init",
"packageName": "react-native-macos-init",
"email": "[email protected]",
"dependentChangeType": "patch",
"date": "2020-04-04T04:43:14.681Z"
}
86 changes: 45 additions & 41 deletions packages/react-native-macos-init/package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
{
"name": "react-native-macos-init",
"version": "0.0.9",
"description": "CLI to add react-native-macos to an existing react-native project",
"main": "index.js",
"repository": "https://github.com/microsoft/react-native-macos",
"license": "MIT",
"private": false,
"scripts": {
"build": "just-scripts build",
"clean": "just-scripts clean",
"lint": "just-scripts lint",
"lint:fix": "just-scripts lint:fix",
"prepublishOnly": "npm run build"
},
"bin": {
"react-native-macos-init": "./bin.js"
},
"dependencies": {
"chalk": "^3",
"npm-registry": "^0.1.13",
"prompts": "^2.3.0",
"find-up": "^4.1.0",
"semver": "^7.1.3",
"valid-url": "^1.0.9",
"yargs": "^15.1.0"
},
"devDependencies": {
"@types/chalk": "^2.2.0",
"@types/prompts": "^2.0.3",
"@types/semver": "^7.1.0",
"@types/valid-url": "^1.0.2",
"@types/yargs": "^15.0.3",
"just-scripts": "^0.36.1",
"typescript": "3.5.3"
},
"files": [
"bin.js",
"lib-commonjs",
"README.md"
]
}
"name": "react-native-macos-init",
"version": "0.0.0",
"description": "CLI to add react-native-macos to an existing react-native project",
"main": "index.js",
"repository": "https://github.com/microsoft/react-native-macos",
"license": "MIT",
"private": false,
"scripts": {
"change": "beachball change",
"check": "beachball check",
"clean": "just-scripts clean",
"beachball:publish": "beachball publish",
"build": "just-scripts build",
"lint": "just-scripts lint",
"lint:fix": "just-scripts lint:fix",
"prepublishOnly": "npm run build"
},
"bin": {
"react-native-macos-init": "./bin.js"
},
"dependencies": {
"chalk": "^3",
"find-up": "^4.1.0",
"npm-registry": "^0.1.13",
"prompts": "^2.3.0",
"semver": "^7.1.3",
"valid-url": "^1.0.9",
"yargs": "^15.1.0"
},
"devDependencies": {
"@types/chalk": "^2.2.0",
"@types/prompts": "^2.0.3",
"@types/semver": "^7.1.0",
"@types/valid-url": "^1.0.2",
"@types/yargs": "^15.0.3",
"beachball": "^1.27.0",
"just-scripts": "^0.36.1",
"typescript": "3.5.3"
},
"files": [
"bin.js",
"lib-commonjs",
"README.md"
]
}
Loading