From 562695c953f6aebaacb1eaa93ab4a72f3fe253d3 Mon Sep 17 00:00:00 2001 From: Brian Rojas Date: Thu, 21 Nov 2019 16:00:19 -0600 Subject: [PATCH] Auto publish release on GH --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf20834..8447370 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,12 @@ jobs: - run: name: Publish package command: npm publish --access public + - run: + name: Publish Release on GitHub + command: | + ios_version=$(sed -n "/s.dependency 'Pilgrim', '= [0-9].[0-9].[0-9]'/p" pilgrim-sdk-react-native.podspec | sed "s/ s.dependency 'Pilgrim', '= \([0-9].[0-9].[0-9]\)'/\1/") + android_version=$(sed -n "/implementation 'com.foursquare:pilgrimsdk:[0-9].[0-9].[0-9]'/p" android/build.gradle | sed "s/ implementation 'com.foursquare:pilgrimsdk:\([0-9].[0-9].[0-9]\)'/\1/") + curl -s -X POST -d "{\"tag_name\":\"$CIRCLE_TAG\",\"name\":\"$CIRCLE_TAG\",\"body\":\"iOS SDK version: ${ios_version}\nAndroid SDK version: ${android_version}\",\"draft\":false,\"prerelease\":false}" -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/foursquare/pilgrim-sdk-react-native/releases" workflows: version: 2 main: