diff --git a/.gitea/workflows/publish-maven.yaml b/.gitea/workflows/publish-maven.yaml new file mode 100644 index 0000000..cc23ce4 --- /dev/null +++ b/.gitea/workflows/publish-maven.yaml @@ -0,0 +1,19 @@ +name: Publish artifact to maven repository workflow +on: + workflow_call: +jobs: + publish_maven: + name: Publish distribution + runs-on: docker-ubuntu + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Setup java runtime + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{ vars.JAVA_VERSION }} + - name: Publish to maven + run: | + echo "Target: ${{ gitea.api_url }}/packages/${{ gitea.repository_owner }}/maven" + ./gradlew publish -PMAVEN_PUBLISH_ACCESS_TOKEN=${{ secrets.GIT_ACCESS_TOKEN }} -PMAVEN_PUBLISH_REPOSITORY_URL="${{ gitea.api_url }}/packages/${{ gitea.repository_owner }}/maven" \ No newline at end of file diff --git a/gradle/build-mavenpublish.gradle b/gradle/build-mavenpublish.gradle index db5ee15..e43a0ff 100644 --- a/gradle/build-mavenpublish.gradle +++ b/gradle/build-mavenpublish.gradle @@ -38,6 +38,7 @@ publishing { } repositories { maven { + name = "git.captica.de" url uri(mavenRepositoryUrl) credentials(HttpHeaderCredentials) {