Skip to content

Publish

Publish #12

Workflow file for this run

name: Publish
on: [workflow_dispatch]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Setup jdk19
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "20.0.2"
cache: gradle
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
# TODO enable tests on CD
run: ./gradlew -x test --no-daemon publish --stacktrace
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties