Skip to content

Commit 562695c

Browse files
committed
Auto publish release on GH
1 parent f01278a commit 562695c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
- run:
1515
name: Publish package
1616
command: npm publish --access public
17+
- run:
18+
name: Publish Release on GitHub
19+
command: |
20+
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/")
21+
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/")
22+
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"
1723
workflows:
1824
version: 2
1925
main:

0 commit comments

Comments
 (0)