File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4+ pull_request :
45 workflow_dispatch :
56 inputs :
67 version-override :
78 type : string
89 required : false
910 description : ' Optionally specify a custom release version (minor version bump e.g.)'
11+ kn-release :
12+ type : boolean
13+ required : false
14+ default : false
15+ description : ' Whether the release is a KN variant of repo tools'
1016
1117permissions :
1218 id-token : write
@@ -30,12 +36,20 @@ jobs:
3036 exit 0
3137 fi
3238
33- CURRENT_VERSION=$(git tag --sort=-creatordate | head -n 1)
39+ if [ "${{ inputs.kn-release }}" == "true" ]; then
40+ CURRENT_VERSION=$(git tag --sort=-creatordate | grep -- '-kn$' | head -n 1)
41+ else
42+ CURRENT_VERSION=$(git tag --sort=-creatordate | head -n 1)
43+ fi
3444
3545 IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
36- PATCH=$((PATCH + 1))
37- RESOLVED_VERSION="$MAJOR.$MINOR.$PATCH"
3846
47+ PATCH_NUMBER=${PATCH%%[^0-9]*}
48+ SUFFIX=${PATCH#$PATCH_NUMBER}
49+ ((PATCH_NUMBER++))
50+ PATCH="${PATCH_NUMBER}${SUFFIX}"
51+
52+ RESOLVED_VERSION="$MAJOR.$MINOR.$PATCH"
3953 echo "NEW_VERSION=$RESOLVED_VERSION" >> "$GITHUB_OUTPUT"
4054
4155 - name : Configure git
4963 run : |
5064 git tag "$NEW_VERSION"
5165 git push origin "$NEW_VERSION"
66+ exit 1
5267
5368 - name : Configure Gradle
5469 uses : awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
You can’t perform that action at this time.
0 commit comments