From 2b6afeac3dd5403dbc77d8afe56be53d04fe7af2 Mon Sep 17 00:00:00 2001 From: Bartol Karuza Date: Wed, 24 Apr 2019 18:06:30 +0200 Subject: [PATCH] chore(ci) add publish step on master commits (#48) fix(ci): initial release using semantic-release --- .circleci/config.yml | 39 +++++++++++++++++++++++++++------------ .releaserc | 15 +++++++++++++++ 2 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 .releaserc diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d7b11ddd..d734c4558 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,6 +35,14 @@ jobs: - run: name: iOS JavaScript Bundle command: yarn run test:detox:ios:bundle:release + publish: + executor: rn/linux_js + steps: + - attach_workspace: + at: . + - run: + name: Publish to NPM + command: yarn ci:publish workflows: test: @@ -43,18 +51,18 @@ workflows: - analyze: requires: - checkout_code - # - rn/android_build: - # name: android_debug_build - # project_path: "example/android" - # build_type: debug - # requires: - # - analyze - # - rn/android_build: - # name: android_release_build - # project_path: "example/android" - # build_type: release - # requires: - # - analyze + - rn/android_build: + name: android_debug_build + project_path: "example/android" + build_type: debug + requires: + - analyze + - rn/android_build: + name: android_release_build + project_path: "example/android" + build_type: release + requires: + - analyze # - rn/android_test: # logcat_grep: "com.camerarollexample" # detox_configuration: "android.emu.release" @@ -69,3 +77,10 @@ workflows: # detox_configuration: "ios.sim.release" # requires: # - analyze + - publish: + requires: + - checkout_code + - analyze + filters: + branches: + only: master diff --git a/.releaserc b/.releaserc new file mode 100644 index 000000000..4a206d39d --- /dev/null +++ b/.releaserc @@ -0,0 +1,15 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/npm", + "@semantic-release/github", + [ + "@semantic-release/git", + { + "assets": "package.json", + "message": "chore(release): ${nextRelease.version} [skip ci] \n\n${nextRelease.notes}" + } + ] + ] +}