(patch) Automating release builds.
All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m7s
All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m7s
This commit is contained in:
parent
1c7861705d
commit
f6a6b25fbc
1 changed files with 20 additions and 12 deletions
|
@ -1,15 +1,7 @@
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
push:
|
||||||
inputs:
|
branches:
|
||||||
releaseType:
|
- main
|
||||||
description: 'Release Type'
|
|
||||||
required: true
|
|
||||||
default: 'patch'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- major
|
|
||||||
- minor
|
|
||||||
- patch
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
library_release:
|
library_release:
|
||||||
|
@ -20,7 +12,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GS_MAVEN_USER: ${{ vars.GS_MAVEN_USER }}
|
GS_MAVEN_USER: ${{ vars.GS_MAVEN_USER }}
|
||||||
GS_MAVEN_TOKEN: ${{ secrets.GS_MAVEN_TOKEN }}
|
GS_MAVEN_TOKEN: ${{ secrets.GS_MAVEN_TOKEN }}
|
||||||
GS_RELEASE_TYPE: ${{ inputs.releaseType }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: 'Checkout Repository'
|
name: 'Checkout Repository'
|
||||||
|
@ -36,6 +27,23 @@ jobs:
|
||||||
sbtn coverageReport
|
sbtn coverageReport
|
||||||
- name: 'Publish Release'
|
- name: 'Publish Release'
|
||||||
run: |
|
run: |
|
||||||
|
latest_commit_message="$(git show -s --format=%s HEAD)"
|
||||||
|
case "$latest_commit_message" in
|
||||||
|
*(patch)*)
|
||||||
|
export GS_RELEASE_TYPE="patch"
|
||||||
|
;;
|
||||||
|
*(minor)*)
|
||||||
|
export GS_RELEASE_TYPE="minor"
|
||||||
|
;;
|
||||||
|
*(major)*)
|
||||||
|
export GS_RELEASE_TYPE="major"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export GS_RELEASE_TYPE="patch"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo "Latest Commit: $latest_commit_message"
|
||||||
|
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
||||||
sbtn clean
|
sbtn clean
|
||||||
sbtn "-Drelease=$GS_RELEASE_TYPE" semVerInfo
|
sbtn "-Drelease=$GS_RELEASE_TYPE" semVerInfo
|
||||||
sbtn "-Drelease=$GS_RELEASE_TYPE" semVerWriteVersionToFile
|
sbtn "-Drelease=$GS_RELEASE_TYPE" semVerWriteVersionToFile
|
||||||
|
|
Loading…
Add table
Reference in a new issue