mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
39 lines
1.6 KiB
YAML
39 lines
1.6 KiB
YAML
name: Publish Gradle Plugin
|
|
description: Publishes Spring Boot's Gradle plugin to the Plugin Portal
|
|
inputs:
|
|
jfrog-cli-config-token:
|
|
description: 'Config token for the JFrog CLI'
|
|
required: true
|
|
plugin-version:
|
|
description: 'Version of the plugin'
|
|
required: true
|
|
gradle-plugin-publish-key:
|
|
description: 'Gradle publishing key'
|
|
required: true
|
|
gradle-plugin-publish-secret:
|
|
description: 'Gradle publishing secret'
|
|
required: true
|
|
build-number:
|
|
description: 'The build number to use when downloading plugin artifacts'
|
|
required: false
|
|
default: ${{ github.run_number }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Set Up JFrog CLI
|
|
uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad # v4.1.2
|
|
env:
|
|
JF_ENV_SPRING: ${{ inputs.jfrog-cli-config-token }}
|
|
- name: Download Artifacts
|
|
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=${{ inputs.build-number }}'
|
|
- name: Set Up Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'liberica'
|
|
java-version: '17'
|
|
- name: Publish
|
|
shell: bash
|
|
working-directory: ${{ github.action_path }}
|
|
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
|