Skip to content

Update jline to v3.30.12 #1949

Update jline to v3.30.12

Update jline to v3.30.12 #1949

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://docs.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches:
- libdeflate
pull_request:
workflow_dispatch:
env:
RELEASE_BRANCH: refs/heads/libdeflate
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'
- name: Build with Gradle
run: ./gradlew build
- name: Generate Release Tag
if: github.ref == env.RELEASE_BRANCH
id: release_tag
run: |
# Fetch all tags from remote
git fetch --tags
# Get the latest build number from existing releases
LATEST_BUILD=0
# Check if there are existing build tags and find the highest number
if git tag | grep -E "^build-[0-9]+$" > /dev/null; then
LATEST_BUILD=$(git tag | grep -E "^build-[0-9]+$" | sed 's/build-//' | sort -n | tail -1)
fi
# Debug output
echo "All tags:"
git tag
echo "Build tags found:"
git tag | grep -E "^build-[0-9]+$" || echo "No build tags found"
echo "Latest build number found: $LATEST_BUILD"
# Increment the build number
NEW_BUILD=$((LATEST_BUILD + 1))
echo "tag=build-$NEW_BUILD" >> $GITHUB_OUTPUT
echo "build_nr=$NEW_BUILD" >> $GITHUB_OUTPUT
echo "Generated tag: build-$NEW_BUILD"
echo "Previous highest build: $LATEST_BUILD"
echo "New build number: $NEW_BUILD"
- name: Rename Velocity-CTD Jar
if: github.ref == env.RELEASE_BRANCH
run: |
JAR=$(ls proxy/build/libs/velocity-proxy-*-all.jar)
VERSION=$(echo "$JAR" | sed 's|proxy/build/libs/velocity-proxy-||' | sed 's|-all\.jar||')
cp "$JAR" "proxy/build/libs/velocity-ctd-$VERSION-${{ steps.release_tag.outputs.build_nr }}.jar"
- name: Publish to Maven Repository
if: github.ref == env.RELEASE_BRANCH
continue-on-error: true
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_velocityctdUser: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_velocityctdPassword: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload as GitHub Release
if: github.ref == env.RELEASE_BRANCH
continue-on-error: true
uses: marvinpinto/action-automatic-releases@master
with:
title: "Velocity-CTD"
automatic_release_tag: "${{ steps.release_tag.outputs.tag }}"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: "proxy/build/libs/velocity-ctd-*-${{ steps.release_tag.outputs.build_nr }}.jar"
prerelease: false