Skip to content

Merge pull request #7 from o7studios/renovate/actions-setup-java-5.x #38

Merge pull request #7 from o7studios/renovate/actions-setup-java-5.x

Merge pull request #7 from o7studios/renovate/actions-setup-java-5.x #38

Workflow file for this run

name: "⚙️ CI & Release Workflow"
on:
push:
pull_request:
types: [ opened, reopened ]
env:
JAVA_VERSION: '23'
JAVA_DISTRIBUTION: 'temurin'
permissions:
contents: write
jobs:
releaser:
name: "🏁 Release"
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: "📥 Checkout Code (Full History)"
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: ☕ Setup Java ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v5
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: ⚡ Setup Gradle with Cache
uses: gradle/actions/setup-gradle@v4
- name: "🚀 Publish to Maven Central"
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
RAW_TAG="${GITHUB_REF##*/}"
VERSION="${RAW_TAG#v}"
[[ "$VERSION" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1
./gradlew :api:publishToCentralPortal -Pversion="$VERSION"