Skip to content

Commit a823b0a

Browse files
committed
Match swift-version 6.1 to latest development snapshot
1 parent 2b5fdff commit a823b0a

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.github/workflows/test-action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: ['ubuntu-24.04', 'ubuntu-22.04', 'macos-13', 'macos-15']
14-
swift-version: ['6.0.3', '6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a']
14+
swift-version: ['6.0.3', '6.1']
1515
steps:
1616
- name: Checkout Action
1717
uses: actions/checkout@v4
@@ -70,7 +70,7 @@ jobs:
7070
fail-fast: false
7171
matrix:
7272
os: ['ubuntu-24.04', 'ubuntu-22.04', 'macos-13', 'macos-15']
73-
swift-version: ['6.0.3', '6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a']
73+
swift-version: ['6.0.3', '6.1']
7474
steps:
7575
- name: Checkout Action
7676
uses: actions/checkout@v4

action.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,21 @@ runs:
112112
# 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
113113
# 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
114114
115-
#swift-branch='swift-6.0.3-release'
116-
#swift-branch='swift-6.1-branch'
117-
#swift-branch='development'
118115
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+
119125
# 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}"
126130
fi
127131
128132
echo "SWIFT_VERSION: ${SWIFT_VERSION}"

0 commit comments

Comments
 (0)