update publish artifact
This commit is contained in:
12
.github/workflows/publish-artifact.yml
vendored
12
.github/workflows/publish-artifact.yml
vendored
@@ -16,6 +16,10 @@ on:
|
||||
description: Release version
|
||||
required: true
|
||||
type: string
|
||||
GRADLE_TASK:
|
||||
description: Gradle task to run (e.g., 'build publish' or 'publishPluginMavenPublicationToGitHubPackagesRepository')
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
CI_BOT_PAT:
|
||||
required: true
|
||||
@@ -25,7 +29,7 @@ env:
|
||||
REPOSITORY_TOKEN: ${{ secrets.CI_BOT_PAT }}
|
||||
|
||||
jobs:
|
||||
publish-artifact:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -33,11 +37,13 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: "v${{ inputs.PROJECT_VERSION }}"
|
||||
token: ${{ secrets.CI_BOT_PAT }}
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ inputs.JAVA_VERSION }}
|
||||
cache: 'gradle'
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build publish
|
||||
|
||||
- name: Run Gradle
|
||||
run: ./gradlew ${{ inputs.GRADLE_TASK }}
|
||||
|
||||
43
.github/workflows/publish-catalog.yml
vendored
43
.github/workflows/publish-catalog.yml
vendored
@@ -1,43 +0,0 @@
|
||||
name: Publish Catalog
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
JAVA_VERSION:
|
||||
description: Java version to use
|
||||
required: false
|
||||
type: string
|
||||
default: '17'
|
||||
PROJECT_NAME:
|
||||
description: Project name
|
||||
required: true
|
||||
type: string
|
||||
PROJECT_VERSION:
|
||||
description: Release version
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
CI_BOT_PAT:
|
||||
required: true
|
||||
|
||||
env:
|
||||
REPOSITORY_USER: ${{ vars.CI_BOT_USERNAME }}
|
||||
REPOSITORY_TOKEN: ${{ secrets.CI_BOT_PAT }}
|
||||
|
||||
jobs:
|
||||
publish-catalog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: "v${{ inputs.PROJECT_VERSION }}"
|
||||
token: ${{ secrets.CI_BOT_PAT }}
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ inputs.JAVA_VERSION }}
|
||||
cache: 'gradle'
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew publish
|
||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -23,7 +23,7 @@ on:
|
||||
type: string
|
||||
TYPE:
|
||||
default: ''
|
||||
description: Type of release (service, artifact, or catalog)
|
||||
description: Type of release (service, artifact, or plugin)
|
||||
required: false
|
||||
type: string
|
||||
|
||||
@@ -151,17 +151,19 @@ jobs:
|
||||
secrets:
|
||||
CI_BOT_PAT: ${{ secrets.CI_BOT_PAT }}
|
||||
with:
|
||||
GRADLE_TASK: publish
|
||||
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
|
||||
PROJECT_NAME: ${{ needs.release.outputs.project-name }}
|
||||
PROJECT_VERSION: ${{ needs.release.outputs.release-version }}
|
||||
|
||||
finalise-publish-catalog:
|
||||
finalise-publish-plugin:
|
||||
needs: release
|
||||
if: needs.release.outputs.has-changes == 'true' && inputs.TYPE == 'catalog'
|
||||
uses: ./.github/workflows/publish-catalog.yml
|
||||
if: needs.release.outputs.has-changes == 'true' && inputs.TYPE == 'plugin'
|
||||
uses: ./.github/workflows/publish-artifact.yml
|
||||
secrets:
|
||||
CI_BOT_PAT: ${{ secrets.CI_BOT_PAT }}
|
||||
with:
|
||||
GRADLE_TASK: publishAllPublicationsToGitHubPackagesRepository
|
||||
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
|
||||
PROJECT_NAME: ${{ needs.release.outputs.project-name }}
|
||||
PROJECT_VERSION: ${{ needs.release.outputs.release-version }}
|
||||
|
||||
Reference in New Issue
Block a user