Skip to content

Commit 933e47d

Browse files
committed
Update action to use dynamically fetch the most recent toolchain version from the releases at https://github.com/skiptools/swift-android-toolchain/releases/
1 parent 1465975 commit 933e47d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ runs:
9898
9999
# translate swift-version "latest" into our known latest version
100100
if [ "${{ inputs.swift-version }}" == 'latest' ]; then
101-
echo "swift-version=6.0.2" >> $GITHUB_OUTPUT
101+
# fetch the most recent release tag from the toolchain repo
102+
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/skiptools/swift-android-toolchain/releases/latest | jq -r '.tag_name')
103+
echo "swift-version=${LATEST_TAG}" >> $GITHUB_OUTPUT
102104
else
103105
echo "swift-version=${{ inputs.swift-version }}" >> $GITHUB_OUTPUT
104106
fi

0 commit comments

Comments
 (0)