use different action to get Swift 6 toolchain

This commit is contained in:
Oliver Drobnik
2025-03-06 18:01:57 +01:00
parent 78e31ab3f2
commit 02bcdf0bb1
+9 -14
View File
@@ -1,6 +1,3 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Swift
on:
@@ -12,22 +9,20 @@ on:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Swift 6 Toolchain (Nightly)
run: |
TOOLCHAIN_URL=$(curl -s https://download.swift.org/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2024-03-05-a/swift-DEVELOPMENT-SNAPSHOT-2024-03-05-a-osx.pkg)
curl -O $TOOLCHAIN_URL
sudo installer -pkg swift-*-osx.pkg -target /
export TOOLCHAIN=`/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier" /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-*/Info.plist`
sudo xcode-select -s /Library/Developer/Toolchains/$TOOLCHAIN/usr/bin
- name: Setup Swift 6.0
uses: swift-actions/setup-swift@v2.2.0
with:
swift-version: "6.0"
- name: Verify Swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
- name: Run tests
run: swift test -v