From 962bc53068277fb435f99f5173e435a2a9580633 Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Sun, 7 Sep 2025 00:04:46 +0200 Subject: [PATCH] add publish artifact --- .gitea/workflows/publish-artifact.yaml | 48 ++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 .gitea/workflows/publish-artifact.yaml diff --git a/.gitea/workflows/publish-artifact.yaml b/.gitea/workflows/publish-artifact.yaml new file mode 100644 index 0000000..f9515d8 --- /dev/null +++ b/.gitea/workflows/publish-artifact.yaml @@ -0,0 +1,48 @@ +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 }} diff --git a/README.md b/README.md index 27a955f..236baac 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Common Workflows. +Rules and stuff say keep workflow in `/.gite/workflow` look at `/.gite/actions` later on. + ## Actions secrets and variables. ### Secrets