@@ -51,15 +51,17 @@ private static async Task<int> CreateReleaseAsync(CreateSubOptions subOptions, I
51
51
var github = subOptions . CreateGitHubClient ( ) ;
52
52
var configuration = ConfigurationProvider . Provide ( subOptions . TargetDirectory ?? Environment . CurrentDirectory , fileSystem ) ;
53
53
54
+ Release release ;
54
55
if ( ! string . IsNullOrEmpty ( subOptions . Milestone ) )
55
56
{
56
- await CreateReleaseFromMilestone ( github , subOptions . RepositoryOwner , subOptions . RepositoryName , subOptions . Milestone , subOptions . TargetCommitish , subOptions . AssetPaths , subOptions . Prerelease , configuration ) ;
57
+ release = await CreateReleaseFromMilestone ( github , subOptions . RepositoryOwner , subOptions . RepositoryName , subOptions . Milestone , subOptions . TargetCommitish , subOptions . AssetPaths , subOptions . Prerelease , configuration ) ;
57
58
}
58
59
else
59
60
{
60
- await CreateReleaseFromInputFile ( github , subOptions . RepositoryOwner , subOptions . RepositoryName , subOptions . Name , subOptions . InputFilePath , subOptions . TargetCommitish , subOptions . AssetPaths , subOptions . Prerelease ) ;
61
+ release = await CreateReleaseFromInputFile ( github , subOptions . RepositoryOwner , subOptions . RepositoryName , subOptions . Name , subOptions . InputFilePath , subOptions . TargetCommitish , subOptions . AssetPaths , subOptions . Prerelease ) ;
61
62
}
62
63
64
+ Console . WriteLine ( release . HtmlUrl ) ;
63
65
return 0 ;
64
66
}
65
67
catch ( Exception ex )
@@ -172,7 +174,7 @@ private static int ShowConfig(ShowConfigSubOptions subOptions, IFileSystem fileS
172
174
return 0 ;
173
175
}
174
176
175
- private static async Task CreateReleaseFromMilestone ( GitHubClient github , string owner , string repository , string milestone , string targetCommitish , IList < string > assets , bool prerelease , Config configuration )
177
+ private static async Task < Release > CreateReleaseFromMilestone ( GitHubClient github , string owner , string repository , string milestone , string targetCommitish , IList < string > assets , bool prerelease , Config configuration )
176
178
{
177
179
var releaseNotesBuilder = new ReleaseNotesBuilder ( new DefaultGitHubClient ( github , owner , repository ) , owner , repository , milestone , configuration ) ;
178
180
@@ -183,9 +185,11 @@ private static async Task CreateReleaseFromMilestone(GitHubClient github, string
183
185
var release = await github . Release . Create ( owner , repository , releaseUpdate ) ;
184
186
185
187
await AddAssets ( github , assets , release ) ;
188
+
189
+ return release ;
186
190
}
187
191
188
- private static async Task CreateReleaseFromInputFile ( GitHubClient github , string owner , string repository , string name , string inputFilePath , string targetCommitish , IList < string > assets , bool prerelease )
192
+ private static async Task < Release > CreateReleaseFromInputFile ( GitHubClient github , string owner , string repository , string name , string inputFilePath , string targetCommitish , IList < string > assets , bool prerelease )
189
193
{
190
194
if ( ! File . Exists ( inputFilePath ) )
191
195
{
@@ -199,6 +203,8 @@ private static async Task CreateReleaseFromInputFile(GitHubClient github, string
199
203
var release = await github . Release . Create ( owner , repository , releaseUpdate ) ;
200
204
201
205
await AddAssets ( github , assets , release ) ;
206
+
207
+ return release ;
202
208
}
203
209
204
210
private static async Task AddAssets ( GitHubClient github , string owner , string repository , string tagName , IList < string > assets )
0 commit comments