Skip to content

Commit 81f8f67

Browse files
committed
chore(ci): Release using semantic release
1 parent 508d6d6 commit 81f8f67

File tree

5 files changed

+5279
-17
lines changed

5 files changed

+5279
-17
lines changed

.circleci/config.yml

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,68 @@
11
version: 2.1
22

33
orbs:
4+
cli: circleci/[email protected]
45
orb-tools: circleci/orb-tools@2
56

7+
jobs:
8+
pack:
9+
executor: cli/default
10+
steps:
11+
- checkout
12+
- orb-tools/pack:
13+
source: src/
14+
destination: packed-orb.yml
15+
- orb-tools/validate:
16+
orb-path: packed-orb.yml
17+
- store_artifacts:
18+
path: packed-orb.yml
19+
- persist_to_workspace:
20+
root: .
21+
paths: .
22+
publish:
23+
docker:
24+
- image: circleci/node:8
25+
environment:
26+
- PATH: '/opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
27+
steps:
28+
- attach_workspace:
29+
at: .
30+
- restore_cache:
31+
key: yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
32+
- run:
33+
name: Yarn Install
34+
command: yarn install --non-interactive --cache-folder ~/.cache/yarn
35+
- save_cache:
36+
paths:
37+
- ~/.cache/yarn
38+
key: yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
39+
- run:
40+
name: Add Github to known hosts
41+
command: |
42+
mkdir -p ~/.ssh
43+
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
44+
- run:
45+
name: Publish to NPM
46+
command: yarn semantic-release
47+
648
workflows:
749
btd:
850
jobs:
9-
- orb-tools/pack:
10-
source-dir: src/
11-
destination-orb-path: packed-orb.yml
12-
workspace-path: packed-orb.yml
13-
artifact-path: packed-orb.yml
51+
- pack
1452

1553
- orb-tools/publish:
1654
orb-path: packed-orb.yml
1755
orb-ref: "react-native-community/react-native@dev:${CIRCLE_BRANCH}"
18-
publish-token-variable: "$CIRCLECI_API_TOKEN"
56+
publish-token-variable: CIRCLECI_API_TOKEN
1957
attach-workspace: true
2058
checkout: false
21-
requires: [orb-tools/pack]
59+
requires: [pack]
60+
filters:
61+
branches:
62+
ignore: master
2263

23-
- orb-tools/increment:
24-
orb-path: packed-orb.yml
25-
orb-ref: "react-native-community/react-native"
26-
segment: "patch"
27-
publish-token-variable: "$CIRCLECI_API_TOKEN"
28-
attach-workspace: true
29-
checkout: false
30-
requires: [orb-tools/pack]
64+
- publish:
65+
requires: [pack]
3166
filters:
3267
branches:
3368
only: master

.gitignore

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,130 @@
1+
2+
# Created by https://www.gitignore.io/api/macos,windows,linux,node
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
*.DS_Store
21+
.AppleDouble
22+
.LSOverride
23+
24+
# Icon must end with two \r
25+
Icon
26+
27+
# Thumbnails
28+
._*
29+
30+
# Files that might appear in the root of a volume
31+
.DocumentRevisions-V100
32+
.fseventsd
33+
.Spotlight-V100
34+
.TemporaryItems
35+
.Trashes
36+
.VolumeIcon.icns
37+
.com.apple.timemachine.donotpresent
38+
39+
# Directories potentially created on remote AFP share
40+
.AppleDB
41+
.AppleDesktop
42+
Network Trash Folder
43+
Temporary Items
44+
.apdisk
45+
46+
### Node ###
47+
# Logs
48+
logs
49+
*.log
50+
npm-debug.log*
51+
yarn-debug.log*
52+
yarn-error.log*
53+
54+
# Runtime data
55+
pids
56+
*.pid
57+
*.seed
58+
*.pid.lock
59+
60+
# Directory for instrumented libs generated by jscoverage/JSCover
61+
lib-cov
62+
63+
# Coverage directory used by tools like istanbul
64+
coverage
65+
66+
# nyc test coverage
67+
.nyc_output
68+
69+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
70+
.grunt
71+
72+
# Bower dependency directory (https://bower.io/)
73+
bower_components
74+
75+
# node-waf configuration
76+
.lock-wscript
77+
78+
# Compiled binary addons (http://nodejs.org/api/addons.html)
79+
build/Release
80+
81+
# Dependency directories
82+
node_modules/
83+
jspm_packages/
84+
85+
# Typescript v1 declaration files
86+
typings/
87+
88+
# Optional npm cache directory
89+
.npm
90+
91+
# Optional eslint cache
92+
.eslintcache
93+
94+
# Optional REPL history
95+
.node_repl_history
96+
97+
# Output of 'npm pack'
98+
*.tgz
99+
100+
# Yarn Integrity file
101+
.yarn-integrity
102+
103+
# dotenv environment variables file
104+
.env
105+
106+
107+
### Windows ###
108+
# Windows thumbnail cache files
109+
Thumbs.db
110+
ehthumbs.db
111+
ehthumbs_vista.db
112+
113+
# Folder config file
114+
Desktop.ini
115+
116+
# Recycle Bin used on file shares
117+
$RECYCLE.BIN/
118+
119+
# Windows Installer files
120+
*.cab
121+
*.msi
122+
*.msm
123+
*.msp
124+
125+
# Windows shortcuts
126+
*.lnk
127+
128+
# End of https://www.gitignore.io/api/macos,windows,linux,node
129+
1130
/packed-orb.yml

.releaserc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
[
6+
"semantic-release-circleci-orb",
7+
{
8+
"orbName": "react-native-community/circleci-orb",
9+
"orbPath": "packed-orb.yml"
10+
}
11+
],
12+
"@semantic-release/github",
13+
[
14+
"@semantic-release/git",
15+
{
16+
"assets": "package.json",
17+
"message": "chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}"
18+
}
19+
]
20+
]
21+
}

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
"private": true,
55
"description": "A CircleCI Orb which can be used to simplify building and testing React Native apps.",
66
"scripts": {
7-
"pack": "./scripts/pack.sh"
7+
"pack": "./scripts/pack.sh",
8+
"semantic-release": "semantic-release"
9+
},
10+
"devDependencies": {
11+
"@semantic-release/git": "^7.0.8",
12+
"semantic-release": "^15.13.3",
13+
"semantic-release-circleci-orb": "^1.0.0"
814
},
915
"repository": {
1016
"type": "git",
11-
"url": "git+https://github.com/react-native-community/react-native-circleci-orb.git"
17+
"url": "https://github.com/react-native-community/react-native-circleci-orb.git"
1218
},
1319
"author": "Matt Oakes <[email protected]>",
1420
"license": "MIT",

0 commit comments

Comments
 (0)