Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 625c9c4

Browse files
committed
chore(lane.deploy): Fix release API call by using httparty
1 parent 2de30bb commit 625c9c4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

fastlane/Fastfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
fastlane_require "increment_semver"
2+
fastlane_require "json"
3+
fastlane_require "httparty"
24

35
actions_path 'actions/'
46
fastlane_version "2.61.0"
@@ -93,6 +95,12 @@ end
9395
def post_github_release(version, changes, token=ENV['GITHUB_TOKEN'])
9496
puts "Creating release on GitHub..."
9597
release_changes = changes.gsub(/^## #{version} /m, "## ").gsub("\n", "\\n")
96-
json=%Q[{"tag_name": "#{version}","target_commitish": "master","name": "#{version}","body": "#{release_changes}","draft": false,"prerelease": false}]
97-
sh(%{curl --data '#{json}' https://api.github.com/repos/algolia/algoliasearch-client-android/releases?access_token=#{token}})
98+
result = HTTParty.post(url, :body => {
99+
:tag_name => version,
100+
:target_commitish => "master",
101+
:name => version,
102+
:body => release_changes,
103+
:draft => false,
104+
:prerelease => false}.to_json)
105+
puts "Release posted: #{result}."
98106
end

0 commit comments

Comments
 (0)