File tree Expand file tree Collapse file tree 3 files changed +43
-5
lines changed Expand file tree Collapse file tree 3 files changed +43
-5
lines changed Original file line number Diff line number Diff line change
1
+ description : Runs the process of creating GitHub Release with bump type and git ref
2
+ inputs :
3
+ bumpType :
4
+ description : The bumpType for the command.
5
+ required : true
6
+ gitRef :
7
+ description : The gitRef for the command.
8
+ required : true
9
+ owner :
10
+ description : The owner for the command.
11
+ required : true
12
+ repo :
13
+ description : The repo for the command.
14
+ required : true
15
+ token :
16
+ description : The token for the command.
17
+ required : true
18
+ name : Release
19
+ runs :
20
+ steps :
21
+ - name : Setup Swift, Mint, Cache, etc.
22
+ uses : Wei18/GitHubSwiftActions/Actions/SetUp@main
23
+ - env :
24
+ BUMPTYPE : ${{ inputs.bumpType }}
25
+ GITREF : ${{ inputs.gitRef }}
26
+ OWNER : ${{ inputs.owner }}
27
+ REPO : ${{ inputs.repo }}
28
+ TOKEN : ${{ inputs.token }}
29
+ name : Run Release
30
+ run : ~/.mint/bin/mint run Wei18/GitHubSwiftActions@main Release
31
+ shell : bash
32
+ using : composite
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ let package = Package(
76
76
. product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
77
77
. product( name: " Yams " , package : " Yams " ) ,
78
78
. target( name: " CommentCLI " ) ,
79
+ . target( name: " ReleaseCLI " ) ,
79
80
]
80
81
) ,
81
82
. target( name: " Extensions " )
Original file line number Diff line number Diff line change 8
8
import Foundation
9
9
import ArgumentParser
10
10
import CommentCLI
11
+ import ReleaseCLI
11
12
12
13
/// A command-line interface for building a GitHub Composite Action YAML based on a ParsableCommand.
13
14
struct YamlWriterCLI : ParsableCommand {
14
15
15
16
/// Generates the GitHub Composite Action YAML.
16
17
func run( ) throws {
17
- try makeCommentCLIYaml ( )
18
+ try makeCLIYaml (
19
+ command: Comment . self,
20
+ description: " Runs the process of adding or updating a comment in a GitHub issue or pull request. " )
21
+
22
+ try makeCLIYaml (
23
+ command: Release . self,
24
+ description: " Runs the process of creating GitHub Release with bump type and git ref " )
18
25
}
19
26
20
- private func makeCommentCLIYaml( ) throws {
21
- let command = Comment . self
27
+ private func makeCLIYaml( command: ParsableCommand . Type , description: String ) throws {
22
28
let yaml = try CLIYamlBuilder ( ) . build (
23
29
command: command,
24
- description: " Runs the process of adding or updating a comment in a GitHub issue or pull request. " )
30
+ description: description )
25
31
26
32
let actionPath = try FileBuilder (
27
33
content: yaml,
28
34
command: command,
29
35
basePath: packDirectory ( ) . appendingPathComponent ( " Actions " )
30
36
) . build ( )
31
-
32
37
print ( actionPath)
33
38
}
34
39
You can’t perform that action at this time.
0 commit comments