@@ -112,17 +112,21 @@ runs:
112
112
# https://github.com/skiptools/swift-android-toolchain/releases/download/6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-android-24-0.1.artifactbundle.tar.gz.zip
113
113
# https://download.swift.org/swift-6.1-branch/ubuntu2404/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a/swift-6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a-ubuntu24.04.tar.gz
114
114
115
- #swift-branch='swift-6.0.3-release'
116
- #swift-branch='swift-6.1-branch'
117
- #swift-branch='development'
118
115
SWIFT_VERSION=${{ inputs.swift-version }}
116
+
117
+ # fetch the most recent release tag from the toolchain repo
118
+ #LATEST_RELEASE=$(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')
119
+ # disabled because it frequently gives "The requested URL returned error: 403"
120
+
121
+ # we hardcode the latest builds and will need to update them every time a new snapshot is released
122
+ LATEST_RELEASE="6.0.3"
123
+ LATEST_SNAPSHOT="6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a"
124
+
119
125
# translate swift-version "latest" into our known latest version
120
- if [ "${SWIFT_VERSION}" == 'latest' ]; then
121
- # fetch the most recent release tag from the toolchain repo
122
- #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')
123
- # disabled because it frequently gives "The requested URL returned error: 403"
124
- LATEST_TAG="6.0.3"
125
- SWIFT_VERSION=${LATEST_TAG}
126
+ if [[ "${SWIFT_VERSION}" == '6.0' || "${SWIFT_VERSION}" == 'latest' ]]; then
127
+ SWIFT_VERSION="${LATEST_RELEASE}"
128
+ elif [[ "${SWIFT_VERSION}" == '6.1' || "${SWIFT_VERSION}" == 'snapshot' ]]; then
129
+ SWIFT_VERSION="${LATEST_SNAPSHOT}"
126
130
fi
127
131
128
132
echo "SWIFT_VERSION: ${SWIFT_VERSION}"
0 commit comments