forked from react-native-community/react-native-circleci-orb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Release using semantic release
- Loading branch information
1 parent
508d6d6
commit 81f8f67
Showing
5 changed files
with
5,279 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,68 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
cli: circleci/circleci-cli@0.1.2 | ||
orb-tools: circleci/orb-tools@2 | ||
|
||
jobs: | ||
pack: | ||
executor: cli/default | ||
steps: | ||
- checkout | ||
- orb-tools/pack: | ||
source: src/ | ||
destination: packed-orb.yml | ||
- orb-tools/validate: | ||
orb-path: packed-orb.yml | ||
- store_artifacts: | ||
path: packed-orb.yml | ||
- persist_to_workspace: | ||
root: . | ||
paths: . | ||
publish: | ||
docker: | ||
- image: circleci/node:8 | ||
environment: | ||
- PATH: '/opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
key: yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }} | ||
- run: | ||
name: Yarn Install | ||
command: yarn install --non-interactive --cache-folder ~/.cache/yarn | ||
- save_cache: | ||
paths: | ||
- ~/.cache/yarn | ||
key: yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }} | ||
- run: | ||
name: Add Github to known hosts | ||
command: | | ||
mkdir -p ~/.ssh | ||
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts | ||
- run: | ||
name: Publish to NPM | ||
command: yarn semantic-release | ||
|
||
workflows: | ||
btd: | ||
jobs: | ||
- orb-tools/pack: | ||
source-dir: src/ | ||
destination-orb-path: packed-orb.yml | ||
workspace-path: packed-orb.yml | ||
artifact-path: packed-orb.yml | ||
- pack | ||
|
||
- orb-tools/publish: | ||
orb-path: packed-orb.yml | ||
orb-ref: "react-native-community/react-native@dev:${CIRCLE_BRANCH}" | ||
publish-token-variable: "$CIRCLECI_API_TOKEN" | ||
publish-token-variable: CIRCLECI_API_TOKEN | ||
attach-workspace: true | ||
checkout: false | ||
requires: [orb-tools/pack] | ||
requires: [pack] | ||
filters: | ||
branches: | ||
ignore: master | ||
|
||
- orb-tools/increment: | ||
orb-path: packed-orb.yml | ||
orb-ref: "react-native-community/react-native" | ||
segment: "patch" | ||
publish-token-variable: "$CIRCLECI_API_TOKEN" | ||
attach-workspace: true | ||
checkout: false | ||
requires: [orb-tools/pack] | ||
- publish: | ||
requires: [pack] | ||
filters: | ||
branches: | ||
only: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,130 @@ | ||
|
||
# Created by https://www.gitignore.io/api/macos,windows,linux,node | ||
|
||
### Linux ### | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
### macOS ### | ||
*.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
|
||
### Windows ### | ||
# Windows thumbnail cache files | ||
Thumbs.db | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# End of https://www.gitignore.io/api/macos,windows,linux,node | ||
|
||
/packed-orb.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"semantic-release-circleci-orb", | ||
{ | ||
"orbName": "react-native-community/circleci-orb", | ||
"orbPath": "packed-orb.yml" | ||
} | ||
], | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": "package.json", | ||
"message": "chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.