Skip to content

Commit 1e8f606

Browse files
committed
Update sdkman release workflow - don't set LTS versions as default candidates. Pass explicitlly version of Scala to release instead of latest one
1 parent 9eb858b commit 1e8f606

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

Diff for: .github/workflows/releases.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Releases
22
on:
33
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'The version to officially release'
7+
required: true
8+
type: string
49

510
permissions:
611
contents: read
@@ -29,4 +34,4 @@ jobs:
2934
uses: actions/checkout@v4
3035

3136
- name: Publish to SDKMAN
32-
run: .github/workflows/scripts/publish-sdkman.sh
37+
run: .github/workflows/scripts/publish-sdkman.sh ${{ inputs.version }}

Diff for: .github/workflows/scripts/publish-sdkman.sh

+15-14
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
set -u
1111

1212
# latest stable dotty version
13-
DOTTY_VERSION=$(curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
13+
DOTTY_VERSION=$1
1414
DOTTY_URL="https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION/scala3-$DOTTY_VERSION.zip"
1515

1616
# checking if dotty version is available
@@ -34,17 +34,18 @@ if [[ $? -ne 0 ]]; then
3434
exit 1
3535
fi
3636

37+
# We don't set LTS versions as default candidates, we prefer Next instead
3738
# Set DOTTY_VERSION as Default for Candidate
38-
curl --silent --show-error --fail \
39-
-X PUT \
40-
-H "Consumer-Key: $SDKMAN_KEY" \
41-
-H "Consumer-Token: $SDKMAN_TOKEN" \
42-
-H "Content-Type: application/json" \
43-
-H "Accept: application/json" \
44-
-d '{"candidate": "scala", "version": "'"$DOTTY_VERSION"'"}' \
45-
https://vendors.sdkman.io/default
46-
47-
if [[ $? -ne 0 ]]; then
48-
echo "Fail sending PUT request to announcing the release of scala on SDKMAN."
49-
exit 1
50-
fi
39+
# curl --silent --show-error --fail \
40+
# -X PUT \
41+
# -H "Consumer-Key: $SDKMAN_KEY" \
42+
# -H "Consumer-Token: $SDKMAN_TOKEN" \
43+
# -H "Content-Type: application/json" \
44+
# -H "Accept: application/json" \
45+
# -d '{"candidate": "scala", "version": "'"$DOTTY_VERSION"'"}' \
46+
# https://vendors.sdkman.io/default
47+
48+
# if [[ $? -ne 0 ]]; then
49+
# echo "Fail sending PUT request to announcing the release of scala on SDKMAN."
50+
# exit 1
51+
# fi

0 commit comments

Comments
 (0)