Fix action that publishes the Gradle plugin
- Set up Java so that it's available for ./gradlew to use - Make the build-number an input for easier re-use in an emergency - Use a working directory to hide main repository's buildSrc
This commit is contained in:
20
.github/actions/publish-gradle-plugin/action.yml
vendored
20
.github/actions/publish-gradle-plugin/action.yml
vendored
@@ -13,6 +13,10 @@ inputs:
|
|||||||
gradle-plugin-publish-secret:
|
gradle-plugin-publish-secret:
|
||||||
description: 'Gradle publishing secret'
|
description: 'Gradle publishing secret'
|
||||||
required: true
|
required: true
|
||||||
|
build-number:
|
||||||
|
description: 'The build number to use when downloading plugin artifacts'
|
||||||
|
required: false
|
||||||
|
default: ${{ github.run_number }}
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -22,13 +26,13 @@ runs:
|
|||||||
JF_ENV_SPRING: ${{ inputs.jfrog-cli-config-token }}
|
JF_ENV_SPRING: ${{ inputs.jfrog-cli-config-token }}
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: jf rt download --spec ${{ format('{0}/artifacts.spec', github.action_path) }} --spec-vars 'buildName=${{ format('spring-boot-{0}', inputs.plugin-version) }};buildNumber=${{ github.run_number }}'
|
run: jf rt download --spec ${{ format('{0}/artifacts.spec', github.action_path) }} --spec-vars 'buildName=${{ format('spring-boot-{0}', inputs.plugin-version) }};buildNumber=${{ inputs.build-number }}'
|
||||||
|
- name: Set Up Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'liberica'
|
||||||
|
java-version: '17'
|
||||||
- name: Publish
|
- name: Publish
|
||||||
shell: bash
|
shell: bash
|
||||||
run: >
|
working-directory: ${{ github.action_path }}
|
||||||
./gradlew publishExisting
|
run: ${{ github.workspace }}/gradlew publishExisting -Pgradle.publish.key=${{ inputs.gradle-plugin-publish-key }} -Pgradle.publish.secret=${{ inputs.gradle-plugin-publish-secret }} -PbootVersion=${{ inputs.plugin-version }} -PrepositoryRoot=${{ github.workspace }}/repository
|
||||||
-p ${{ github.action_path }}
|
|
||||||
-Pgradle.publish.key=${{ inputs.gradle-plugin-publish-key }}
|
|
||||||
-Pgradle.publish.secret=${{ inputs.gradle-plugin-publish-secret }}
|
|
||||||
-PbootVersion=${{ inputs.plugin-version }}
|
|
||||||
-PrepositoryRoot=$(pwd)/repository
|
|
||||||
|
|||||||
Reference in New Issue
Block a user