Skip to content

.github/workflows/gradle-publish.yml #10

.github/workflows/gradle-publish.yml

.github/workflows/gradle-publish.yml #10

Workflow file for this run

name: Build, Test, and Publish
on:
push:
tags:
- 'v*'
jobs:
build-test-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle files
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew build
- name: Run tests
run: ./gradlew test
- name: Publish to UTF MVN Repository
env:
UTF_MVN_USER: ${{ secrets.UTF_MVN_USER }}
UTF_MVN_PASS: ${{ secrets.UTF_MVN_PASS }}
run: ./gradlew publishAllPublicationsToUtfMvnRepository