Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Update ProjectRootManager to JDK 23 and change JDK name to corretto-21 #50

Update ProjectRootManager to JDK 23 and change JDK name to corretto-21

Update ProjectRootManager to JDK 23 and change JDK name to corretto-21 #50

Workflow file for this run

name: Release
permissions:
contents: write # Allow the workflow to write to the repository contents
on:
push:
branches: [ master, main, dev ] # ← Added "dev" here
workflow_dispatch:
inputs:
firstName:
description: "Your first name"
type: string
default: Brad
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '23'
distribution: 'temurin'
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: gradle-${{ runner.os }}-
- name: Make gradlew executable
run: chmod +x gradlew
- name: Run tests
run: ./gradlew test
- name: Build shadowJar
run: ./gradlew shadowJar
- name: Find built JAR
id: jar
run: |
JAR_PATH=$(ls build/libs/*.jar | head -n1)
echo "jar_path=$JAR_PATH" >> $GITHUB_OUTPUT
- name: Extract version from JAR
id: vars
run: |
VERSION=$(unzip -p "${{ steps.jar.outputs.jar_path }}" plugin.yml \
| grep '^version:' \
| sed 's/version:[ ]*//')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Fetch all tags
run: git fetch --tags
- name: Check if tag exists
run: |
TAG=${{ steps.vars.outputs.version }}
if git ls-remote --tags origin "refs/tags/$TAG" | grep -q "$TAG"; then
echo "❌ Tag '$TAG' already exists. Exiting."
exit 1
else
echo "✅ Tag '$TAG' is new. Continuing..."
fi
- name: Create Release
id: create
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.version }}
release_name: ${{ steps.vars.outputs.version }}
draft: false
# Always prerelease if we're on dev, otherwise only for -SNAPSHOT
prerelease: ${{ (github.ref == 'refs/heads/dev') || (endsWith(steps.vars.outputs.version, '-SNAPSHOT')) }}
- name: Upload JAR
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create.outputs.upload_url }}
asset_path: ${{ steps.jar.outputs.jar_path }}
asset_name: nextcore-${{ steps.vars.outputs.version }}.jar
asset_content_type: application/java-archive