mirror of https://github.com/LOOHP/Limbo.git
Update build-and-release.yml
This commit is contained in:
parent
7a65d4642d
commit
52f5a058e8
|
|
@ -12,13 +12,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write # Required for creating releases
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get Java version from pom.xml or fallback to 22
|
||||
- name: Get Java version from pom.xml or fallback to 21
|
||||
id: java
|
||||
run: |
|
||||
echo "Attempting to extract Java version from pom.xml..."
|
||||
|
|
@ -26,6 +26,9 @@ jobs:
|
|||
if [[ -z "$version" || "$version" == *"[INFO]"* || "$version" == *"BUILD FAILURE"* ]]; then
|
||||
version=$(mvn help:evaluate -Dexpression=java.version -q -DforceStdout)
|
||||
fi
|
||||
if [[ "$version" == "1.8" ]]; then
|
||||
version="8"
|
||||
fi
|
||||
if [[ -z "$version" || "$version" == *"[INFO]"* || "$version" == *"BUILD FAILURE"* ]]; then
|
||||
version="21"
|
||||
echo "Falling back to Java version $version"
|
||||
|
|
@ -48,7 +51,6 @@ jobs:
|
|||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create GitHub Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ steps.get_version.outputs.version }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue