File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 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
1616jobs :
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)
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 ;;
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]"
You can’t perform that action at this time.
0 commit comments