Skip to content

add gradle catalog and publish to maven central #20

add gradle catalog and publish to maven central

add gradle catalog and publish to maven central #20

Workflow file for this run

name: Java CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Fetch Tags
if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: git fetch --tags --force
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Cache Gradle and Assets
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
build/assets
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '.gradle/dependency-locks/*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Plugin
run: |
./gradlew clean build --info
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2"
- name: Get Release Version
id: get_version
run: |
VERSION=$(./gradlew currentVersion -q -Prelease.quiet | tail -n 1)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "Detected version: ${VERSION}"
- name: Show build contents
run: |
echo "Build directory contents:"
find build/ -ls
- name: Upload Plugin Artifact
uses: actions/upload-artifact@v4
with:
name: git-plugin-${{ steps.get_version.outputs.VERSION }}
path: |
build/libs/git-plugin-${{ steps.get_version.outputs.VERSION }}.jar
if-no-files-found: error