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
|
description: Release version
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
GRADLE_TASK:
|
||||||
|
description: Gradle task to run (e.g., 'build publish' or 'publishPluginMavenPublicationToGitHubPackagesRepository')
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
CI_BOT_PAT:
|
CI_BOT_PAT:
|
||||||
required: true
|
required: true
|
||||||
@@ -25,7 +29,7 @@ env:
|
|||||||
REPOSITORY_TOKEN: ${{ secrets.CI_BOT_PAT }}
|
REPOSITORY_TOKEN: ${{ secrets.CI_BOT_PAT }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-artifact:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -33,11 +37,13 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: "v${{ inputs.PROJECT_VERSION }}"
|
ref: "v${{ inputs.PROJECT_VERSION }}"
|
||||||
token: ${{ secrets.CI_BOT_PAT }}
|
token: ${{ secrets.CI_BOT_PAT }}
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: ${{ inputs.JAVA_VERSION }}
|
java-version: ${{ inputs.JAVA_VERSION }}
|
||||||
cache: 'gradle'
|
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: string
|
||||||
TYPE:
|
TYPE:
|
||||||
default: ''
|
default: ''
|
||||||
description: Type of release (service, artifact, or catalog)
|
description: Type of release (service, artifact, or plugin)
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
@@ -151,17 +151,19 @@ jobs:
|
|||||||
secrets:
|
secrets:
|
||||||
CI_BOT_PAT: ${{ secrets.CI_BOT_PAT }}
|
CI_BOT_PAT: ${{ secrets.CI_BOT_PAT }}
|
||||||
with:
|
with:
|
||||||
|
GRADLE_TASK: publish
|
||||||
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
|
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
|
||||||
PROJECT_NAME: ${{ needs.release.outputs.project-name }}
|
PROJECT_NAME: ${{ needs.release.outputs.project-name }}
|
||||||
PROJECT_VERSION: ${{ needs.release.outputs.release-version }}
|
PROJECT_VERSION: ${{ needs.release.outputs.release-version }}
|
||||||
|
|
||||||
finalise-publish-catalog:
|
finalise-publish-plugin:
|
||||||
needs: release
|
needs: release
|
||||||
if: needs.release.outputs.has-changes == 'true' && inputs.TYPE == 'catalog'
|
if: needs.release.outputs.has-changes == 'true' && inputs.TYPE == 'plugin'
|
||||||
uses: ./.github/workflows/publish-catalog.yml
|
uses: ./.github/workflows/publish-artifact.yml
|
||||||
secrets:
|
secrets:
|
||||||
CI_BOT_PAT: ${{ secrets.CI_BOT_PAT }}
|
CI_BOT_PAT: ${{ secrets.CI_BOT_PAT }}
|
||||||
with:
|
with:
|
||||||
|
GRADLE_TASK: publishAllPublicationsToGitHubPackagesRepository
|
||||||
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
|
JAVA_VERSION: ${{ inputs.JAVA_VERSION }}
|
||||||
PROJECT_NAME: ${{ needs.release.outputs.project-name }}
|
PROJECT_NAME: ${{ needs.release.outputs.project-name }}
|
||||||
PROJECT_VERSION: ${{ needs.release.outputs.release-version }}
|
PROJECT_VERSION: ${{ needs.release.outputs.release-version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user