Skip to content

Commit 74e8bfa

Browse files
committed
Chore lint
1 parent 338c121 commit 74e8bfa

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Actions/Release/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
description: Runs the process of creating GitHub Release with bump type and git ref
22
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
93
owner:
104
description: The owner for the command.
115
required: true
6+
ref:
7+
description: The ref for the command.
8+
required: true
129
repo:
1310
description: The repo for the command.
1411
required: true
1512
token:
1613
description: The token for the command.
1714
required: true
15+
type:
16+
description: The type for the command.
17+
required: true
1818
name: Release
1919
runs:
2020
steps:
2121
- name: Setup Swift, Mint, Cache, etc.
2222
uses: Wei18/GitHubSwiftActions/Actions/SetUp@main
2323
- env:
24-
BUMPTYPE: ${{ inputs.bumpType }}
25-
GITREF: ${{ inputs.gitRef }}
2624
OWNER: ${{ inputs.owner }}
25+
REF: ${{ inputs.ref }}
2726
REPO: ${{ inputs.repo }}
2827
TOKEN: ${{ inputs.token }}
28+
TYPE: ${{ inputs.type }}
2929
name: Run Release
3030
run: ~/.mint/bin/mint run Wei18/GitHubSwiftActions@main Release
3131
shell: bash

Sources/ReleaseCLI/Release.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ package struct Release: ParsableCommand {
2222
var repo: String = #"environment["REPO"]"#
2323

2424
@Option(name: .shortAndLong, help: "The value of major | minor | patch (default)")
25-
var bumpType: String = #"environment["BUMP_TYPE"]"#
25+
var type: String = #"environment["TYPE"]"#
2626

2727
@Option(name: .shortAndLong, help: "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch.")
28-
var gitRef: String = #"environment["GIT_REF"]"#
28+
var ref: String = #"environment["REF"]"#
2929

3030
/// The GitHub API token for authentication.
3131
@Option(name: .shortAndLong, help: "The GitHub API token to authenticate requests.")
@@ -42,11 +42,11 @@ package struct Release: ParsableCommand {
4242
let repo = ProcessInfo.processInfo.environment["REPO"] ?? repo
4343
print("inputs.repo: \(repo)")
4444

45-
let bumpType = BumpVersionType(rawValue: ProcessInfo.processInfo.environment["BUMP_TYPE"] ?? bumpType) ?? .patch
46-
print("inputs.bumpType: \(bumpType)")
45+
let type = BumpVersionType(rawValue: ProcessInfo.processInfo.environment["TYPE"] ?? type) ?? .patch
46+
print("inputs.type: \(type)")
4747

48-
let gitRef = ProcessInfo.processInfo.environment["GIT_REF"] ?? gitRef
49-
print("inputs.gitRef: \(gitRef)")
48+
let ref = ProcessInfo.processInfo.environment["REF"] ?? ref
49+
print("inputs.ref: \(ref)")
5050

5151
let token = ProcessInfo.processInfo.environment["TOKEN"] ?? token
5252
print("inputs.token: \(token)")
@@ -57,8 +57,8 @@ package struct Release: ParsableCommand {
5757
repo: repo
5858
)
5959
try await useCase.createRelease(
60-
type: bumpType,
61-
gitRef: gitRef)
60+
type: type,
61+
gitRef: ref)
6262
print("Release successfully created!")
6363
} catch {
6464
Self.exit(withError: error)

0 commit comments

Comments
 (0)