Skip to content

Commit 851b224

Browse files
authored
ci(pr): deployment commit is now through a PR instead of force push due to protected branch (#596)
1 parent e08b242 commit 851b224

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

fastlane/Fastfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ lane :deploy do |options|
7878
path: "InstantSearchClientOffline.podspec"
7979
)
8080

81+
branchName = "version-#{new_build_number}"
82+
sh("git checkout -b #{branchName}")
83+
8184
#puts changelog_from_git_commits
8285
git_commit(
8386
path: ["InstantSearchClient.podspec", "InstantSearchClientOffline.podspec", "Sources/Info.plist" ,"Tests/Info.plist"],
@@ -88,6 +91,17 @@ lane :deploy do |options|
8891
tag: new_build_number
8992
)
9093
push_to_git_remote(remote: "origin")
94+
95+
create_pull_request(
96+
# api_token: "secret", # optional, defaults to ENV["GITHUB_API_TOKEN"]
97+
repo: "algolia/algoliasearch-client-swift",
98+
title: "Deploying new #{options[:type]} version #{new_build_number}",
99+
head: "#{branchName}", # optional, defaults to current branch name
100+
base: "master", # optional, defaults to "master"
101+
body: "Please check the files before merging in case I've overidden something accidentally.", # optional
102+
# api_url: "http://yourdomain/api/v3" # optional, for GitHub Enterprise, defaults to "https://api.github.com"
103+
)
104+
91105
pod_push(
92106
path: "InstantSearchClient.podspec"
93107
)

0 commit comments

Comments
 (0)