Files
common-workflows/.gitea/workflows/publish-artifact.yaml
2025-09-08 12:19:10 +02:00

46 lines
1.2 KiB
YAML

name: Publish Artifact
on:
workflow_call:
inputs:
JAVA_VERSION:
description: Java version to use
required: false
type: string
default: '17'
BRANCH_REFERENCE:
description: Branch reference
required: true
type: string
GRADLE_TASK:
description: Gradle task to run (e.g., 'build publish' or 'publishPluginMavenPublicationToGitHubPackagesRepository')
required: true
type: string
secrets:
CI_BOT_USERNAME:
required: true
CI_BOT_TOKEN:
required: true
jobs:
publish-artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ inputs.BRANCH_REFERENCE }}
token: ${{ secrets.CI_BOT_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ inputs.JAVA_VERSION }}
- name: Run Gradle
run: ./gradlew ${{ inputs.GRADLE_TASK }}
shell: bash
env:
REPOSITORY_USER: ${{ secrets.CI_BOT_USERNAME }}
REPOSITORY_TOKEN: ${{ secrets.CI_BOT_TOKEN }}