@@ -106,7 +106,7 @@ runs:
106
106
# translate swift-version "latest" into our known latest version
107
107
if [ "${{ inputs.swift-version }}" == 'latest' ]; then
108
108
# fetch the most recent release tag from the toolchain repo
109
- #LATEST_TAG=$(curl -fsSL -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" --retry-all-errors --retry 100 --retry-max-time 600 https://api.github.com/repos/skiptools/swift-android-toolchain/releases/latest | jq -r '.tag_name')
109
+ #LATEST_TAG=$(curl -fsSL -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" --retry 10 --retry-max-time 600 https://api.github.com/repos/skiptools/swift-android-toolchain/releases/latest | jq -r '.tag_name')
110
110
# disabled because it frequently gives "The requested URL returned error: 403"
111
111
LATEST_TAG="6.0.3"
112
112
echo "swift-version=${LATEST_TAG}" >> $GITHUB_OUTPUT
@@ -129,9 +129,9 @@ runs:
129
129
mkdir -p ~/swift-download
130
130
cd ~/swift-download
131
131
if [ ${RUNNER_OS} == 'Linux' ]; then
132
- curl -fsSL --retry 8 --retry-all-errors https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/${{ steps.setup.outputs.osid }}/${SWIFT_ID}/${SWIFT_ID}-${{ steps.setup.outputs.osidpair }}.tar.gz --output swift.tar.gz
132
+ curl -fsSL --retry 8 --retry-connrefused https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/${{ steps.setup.outputs.osid }}/${SWIFT_ID}/${SWIFT_ID}-${{ steps.setup.outputs.osidpair }}.tar.gz --output swift.tar.gz
133
133
elif [ ${RUNNER_OS} == 'macOS' ]; then
134
- curl -fsSL --retry 8 --retry-all-errors https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/xcode/${SWIFT_ID}/${SWIFT_ID}-osx.pkg --output swift.pkg
134
+ curl -fsSL --retry 8 --retry-connrefused https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/xcode/${SWIFT_ID}/${SWIFT_ID}-osx.pkg --output swift.pkg
135
135
else
136
136
echo "::error::Unsupported platform: ${RUNNER_OS}"
137
137
exit 1
@@ -178,7 +178,7 @@ runs:
178
178
179
179
mkdir -p ${RUNNER_TEMP}/swift-android-toolchain
180
180
cd ${RUNNER_TEMP}/swift-android-toolchain
181
- curl -fsSL --retry 8 --retry-all-errors https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
181
+ curl -fsSL --retry 8 --retry-connrefused https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
182
182
183
183
# first check if it already installed (we may be running this workflow multiple times for an action, in which case it will already be present)
184
184
${SWIFT_INSTALLATION}/bin/swift sdk configure --show-configuration ${SWIFT_SDK_ID} ${SWIFT_SDK_TARGET} &> /dev/null || ${SWIFT_INSTALLATION}/bin/swift sdk install ${SWIFT_SDK_ID}.artifactbundle.tar.gz
0 commit comments