spring-boot/.github/actions/publish-to-sdkman/action.yml
Moritz Halbritter c857eb62d4 Fix SDKman "make default" step
The supported HTTP verb is PUT, not POST, see https://sdkman.io/vendors
2024-05-23 13:53:38 +02:00

39 lines
1.5 KiB
YAML

name: Publish to SDKMAN!
description: Publishes the release as a new candidate version on SDKMAN!
inputs:
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: 'The version to publish'
required: true
make-default:
description: 'Whether the release should be made the default version'
required: false
default: false
runs:
using: composite
steps:
- 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
- shell: bash
if: ${{ inputs.make-default == 'true' }}
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