Skip to content

Commit fd1efd4

Browse files
committed
release workflow
1 parent bdd0823 commit fd1efd4

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'kubectl-ktool.sh'
9-
- '.github/workflows/release.yml'
8+
- "kubectl-ktool.sh"
9+
- ".github/workflows/release.yml"
1010
workflow_dispatch:
1111
inputs:
1212
bump:
13-
description: 'Version bump type (major, minor, patch)'
13+
description: "Version bump type (major, minor, patch)"
1414
required: true
1515

1616
jobs:
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- name: Checkout code with full history
2525
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
26-
with:
26+
with:
2727
fetch-depth: 0
2828

2929
- name: Get latest tag (fail if none)
@@ -36,9 +36,9 @@ jobs:
3636
id: determine_tag
3737
run: |
3838
if [ "${{ github.event_name }}" = "push" ]; then
39-
BUMP_TYPE="patch"
39+
BUMP_TYPE="patch"
4040
else
41-
BUMP_TYPE="${{ github.event.inputs.bump }}"
41+
BUMP_TYPE="${{ github.event.inputs.bump }}"
4242
fi
4343
4444
VERSION="${{ steps.get_latest_tag.outputs.LATEST_TAG }}"
@@ -47,19 +47,19 @@ jobs:
4747
IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
4848
4949
case "$BUMP_TYPE" in
50-
major)
50+
major)
5151
MAJOR=$((MAJOR + 1))
5252
MINOR=0
5353
PATCH=0
5454
;;
55-
minor)
55+
minor)
5656
MINOR=$((MINOR + 1))
5757
PATCH=0
5858
;;
59-
patch)
59+
patch)
6060
PATCH=$((PATCH + 1))
6161
;;
62-
*)
62+
*)
6363
echo "Invalid bump type: $BUMP_TYPE"
6464
exit 1
6565
;;
@@ -68,7 +68,6 @@ jobs:
6868
NEW_TAG="v${MAJOR}.${MINOR}.${PATCH}"
6969
echo "Bumping version: $VERSION => $NEW_TAG"
7070
echo "RELEASE_TAG=$NEW_TAG" >> $GITHUB_OUTPUT
71-
7271
- name: Create and push new tag
7372
run: |
7473
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)