File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -86,3 +86,4 @@ fastlane/test_output
86
86
87
87
# Sonarqube
88
88
.scannerwork
89
+
Original file line number Diff line number Diff line change 1
- require 'fileutils'
1
+ require "fileutils"
2
+ require "tempfile"
2
3
3
4
fastlane_version "2.63.0"
4
5
@@ -162,9 +163,27 @@ lane :release do
162
163
# Puplish pod
163
164
pod_push ( path : "JOSESwift.podspec" )
164
165
166
+ # Publish release
167
+ publish_release
168
+
165
169
ensure_git_status_clean
166
170
end
167
171
172
+ desc "Publishes the release on GitHub"
173
+ lane :publish_release do
174
+ version = get_version_number ( target : "JOSESwift" )
175
+
176
+ changelog = File . read ( "../CHANGELOG.md" )
177
+ changes = changelog [ /(- .+\( #.+\) \n )+/ ] # Filter latest change set (e.g. "- Add some feature (#123)\n...").
178
+ tmp_changelog = Tempfile . new ( "jose-changelog" )
179
+ tmp_changelog . write ( changes )
180
+ tmp_changelog . close
181
+
182
+ system ( "gh release create #{ version } --title v#{ version } --notes-file #{ tmp_changelog . path } " )
183
+
184
+ tmp_changelog . unlink
185
+ end
186
+
168
187
desc "Run Sonarqube analysis after running the test lane"
169
188
lane :sonarqube do |options |
170
189
unless ENV [ 'FL_SONAR_LOGIN' ]
You can’t perform that action at this time.
0 commit comments