Skip to content

Commit e9f6c20

Browse files
authored
Update scripts to publish react-native-macos-init (#294)
* Update scripts to publish react-native-macos-init * Change files * Change files * Changed publish to use beachball. * Used yarn install instead of npm install * Add yarn build
1 parent 804e6a6 commit e9f6c20

File tree

5 files changed

+307
-46
lines changed

5 files changed

+307
-46
lines changed

.ado/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,41 @@ jobs:
4949
command: 'publish'
5050
publishEndpoint: 'npmjs'
5151

52+
- job: RNMacOSInitNpmJSPublish
53+
displayName: react-native-macos-init Publish to npmjs.org
54+
pool:
55+
vmImage: vs2017-win2016
56+
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
57+
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
58+
steps:
59+
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
60+
clean: true # whether to fetch clean each time
61+
# fetchDepth: 2 # the depth of commits to ask Git to fetch
62+
lfs: false # whether to download Git-LFS files
63+
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
64+
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
65+
66+
- task: CmdLine@2
67+
displayName: yarn install
68+
inputs:
69+
script: |
70+
cd packages/react-native-macos-init
71+
yarn install
72+
73+
- task: CmdLine@2
74+
displayName: yarn build
75+
inputs:
76+
script: |
77+
cd packages/react-native-macos-init
78+
yarn build
79+
80+
- task: CmdLine@2
81+
displayName: "Publish react-native-macos-init to npmjs.org"
82+
inputs:
83+
script: |
84+
cd packages/react-native-macos-init
85+
npx --no-install beachball publish --branch origin/$(Build.SourceBranchName) -n $(npmAuthToken) -yes -m "applying package updates ***NO_CI***" --access public
86+
5287
- job: RNGithubOfficePublish
5388
displayName: React-Native GitHub Publish to Office
5489
pool:

.ado/versionUtils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function updateVersionsInFiles() {
3434
pkgJson.version = releaseVersion;
3535
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2));
3636
console.log(`Updating package.json to version ${releaseVersion}`);
37+
3738
return {releaseVersion, branchVersionSuffix};
3839
}
3940

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"type": "major",
3+
"comment": "Update scripts to publish react-native-macos-init",
4+
"packageName": "react-native-macos-init",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch",
7+
"date": "2020-04-04T04:43:14.681Z"
8+
}
Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,46 @@
11
{
2-
"name": "react-native-macos-init",
3-
"version": "0.0.9",
4-
"description": "CLI to add react-native-macos to an existing react-native project",
5-
"main": "index.js",
6-
"repository": "https://github.com/microsoft/react-native-macos",
7-
"license": "MIT",
8-
"private": false,
9-
"scripts": {
10-
"build": "just-scripts build",
11-
"clean": "just-scripts clean",
12-
"lint": "just-scripts lint",
13-
"lint:fix": "just-scripts lint:fix",
14-
"prepublishOnly": "npm run build"
15-
},
16-
"bin": {
17-
"react-native-macos-init": "./bin.js"
18-
},
19-
"dependencies": {
20-
"chalk": "^3",
21-
"npm-registry": "^0.1.13",
22-
"prompts": "^2.3.0",
23-
"find-up": "^4.1.0",
24-
"semver": "^7.1.3",
25-
"valid-url": "^1.0.9",
26-
"yargs": "^15.1.0"
27-
},
28-
"devDependencies": {
29-
"@types/chalk": "^2.2.0",
30-
"@types/prompts": "^2.0.3",
31-
"@types/semver": "^7.1.0",
32-
"@types/valid-url": "^1.0.2",
33-
"@types/yargs": "^15.0.3",
34-
"just-scripts": "^0.36.1",
35-
"typescript": "3.5.3"
36-
},
37-
"files": [
38-
"bin.js",
39-
"lib-commonjs",
40-
"README.md"
41-
]
42-
}
2+
"name": "react-native-macos-init",
3+
"version": "0.0.0",
4+
"description": "CLI to add react-native-macos to an existing react-native project",
5+
"main": "index.js",
6+
"repository": "https://github.com/microsoft/react-native-macos",
7+
"license": "MIT",
8+
"private": false,
9+
"scripts": {
10+
"change": "beachball change",
11+
"check": "beachball check",
12+
"clean": "just-scripts clean",
13+
"beachball:publish": "beachball publish",
14+
"build": "just-scripts build",
15+
"lint": "just-scripts lint",
16+
"lint:fix": "just-scripts lint:fix",
17+
"prepublishOnly": "npm run build"
18+
},
19+
"bin": {
20+
"react-native-macos-init": "./bin.js"
21+
},
22+
"dependencies": {
23+
"chalk": "^3",
24+
"find-up": "^4.1.0",
25+
"npm-registry": "^0.1.13",
26+
"prompts": "^2.3.0",
27+
"semver": "^7.1.3",
28+
"valid-url": "^1.0.9",
29+
"yargs": "^15.1.0"
30+
},
31+
"devDependencies": {
32+
"@types/chalk": "^2.2.0",
33+
"@types/prompts": "^2.0.3",
34+
"@types/semver": "^7.1.0",
35+
"@types/valid-url": "^1.0.2",
36+
"@types/yargs": "^15.0.3",
37+
"beachball": "^1.27.0",
38+
"just-scripts": "^0.36.1",
39+
"typescript": "3.5.3"
40+
},
41+
"files": [
42+
"bin.js",
43+
"lib-commonjs",
44+
"README.md"
45+
]
46+
}

0 commit comments

Comments
 (0)