Files
spring-boot/.github/actions/publish-to-sdkman/action.yml
Stéphane Nicoll 20b3e6120d Apply conventions to existing Actions and Workflows
This commit applies the conventions that we documented on our wiki, see
https://github.com/spring-projects/spring-boot/wiki/GitHub-Actions.

In no particular order this:

* Use consistent single quotes for descriptions
* Order elements in a predictable order. In particular, inputs, outputs,
and environment variables are ordered alphabetically

Closes gh-42512
2024-10-04 15:18:18 +02:00

41 lines
1.6 KiB
YAML

name: Publish to SDKMAN!
description: 'Publishes the release as a new candidate version on SDKMAN!'
inputs:
make-default:
description: 'Whether the release should be made the default version'
required: false
default: 'false'
sdkman-consumer-key:
description: 'Key for publishing to SDKMAN!'
required: true
sdkman-consumer-token:
description: 'Token for publishing to SDKMAN!'
required: true
spring-boot-version:
description: 'Version to publish'
required: true
runs:
using: composite
steps:
- name: Publish Release
shell: bash
run: >
curl -X POST \
-H "Consumer-Key: ${{ inputs.sdkman-consumer-key }}" \
-H "Consumer-Token: ${{ inputs.sdkman-consumer-token }}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"candidate": "springboot", "version": "${{ inputs.spring-boot-version }}", "url": "${{ format('https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/{0}/spring-boot-cli-{0}-bin.zip', inputs.spring-boot-version) }}"}' \
https://vendors.sdkman.io/release
- name: Flag Release as Default
if: ${{ inputs.make-default == 'true' }}
shell: bash
run: >
curl -X PUT \
-H "Consumer-Key: ${{ inputs.sdkman-consumer-key }}" \
-H "Consumer-Token: ${{ inputs.sdkman-consumer-token }}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"candidate": "springboot", "version": "${{ inputs.spring-boot-version }}"}' \
https://vendors.sdkman.io/default