Skip to content

Clean up install swift action #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/actions/install-swift/action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: 'Install Swift'
description: 'Installs the Swift specified by a .swift-version file'
name: Install Swift
description: Installs the Swift specified by a .swift-version file

runs:
using: "composite"
steps:
- name: Install apt dependencies
- name: Install `apt` Dependencies
shell: bash
run: |
SUDO=$(if [[ $EUID -ne 0 ]]; then echo sudo; fi)
$SUDO apt-get -qq update
$SUDO apt-get -qq -y install curl gpg binutils git unzip gnupg2 \
libc6-dev libcurl4-openssl-dev libedit2 libgcc-13-dev libpython3-dev \
libstdc++-13-dev libxml2-dev libncurses-dev libz3-dev pkg-config \
tzdata zlib1g-dev
$SUDO apt-get -qq -y install curl gpg
env:
DEBIAN_FRONTEND: noninteractive

Expand All @@ -31,13 +28,17 @@ runs:

curl -O "https://download.swift.org/swiftly/linux/swiftly-$UNAME.tar.gz"
tar zxf "swiftly-$UNAME.tar.gz"
./swiftly init --skip-install --assume-yes --quiet-shell-followup
./swiftly init \
--skip-install \
--assume-yes \
--quiet-shell-followup \
--no-modify-profile

echo "PATH=$SWIFTLY_BIN_DIR:$PATH" >> $GITHUB_ENV
echo "PATH=\$SWIFTLY_BIN_DIR:\$PATH" >> $HOME/.bashrc

- name: Install Swift
shell: bash
run: |
swiftly install
swiftly install --post-install-file ./out.sh
swift --version
Loading