Skip to content

Commit 7ed4f75

Browse files
authored
Retry Swift Actions
1 parent 50663ca commit 7ed4f75

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/swift.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- name: Install Swift using Swiftly
2020
run: |
21+
# Download Swiftly package
2122
curl -O https://download.swift.org/swiftly/darwin/swiftly.pkg
22-
sudo installer -pkg swiftly.pkg -target /
23-
export PATH="/usr/local/bin:$PATH"
24-
swiftly init --quiet-shell-followup
25-
. ~/.swiftly/env.sh
23+
# Install to the current user's home directory to avoid permission issues
24+
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory
25+
# Initialize Swiftly in the user's environment
26+
~/.swiftly/bin/swiftly init --quiet-shell-followup
27+
source ~/.swiftly/env.sh
28+
# Install Swift 6.1
2629
swiftly install 6.1
30+
# Verify installation
2731
swift --version
2832
- name: Build
2933
run: swift build -v

0 commit comments

Comments
 (0)