Install Zig from official GitHub releases
All checks were successful
Create Release / release (push) Successful in 32s
All checks were successful
Create Release / release (push) Successful in 32s
This commit is contained in:
parent
30db380747
commit
c5b99b1fb3
1 changed files with 6 additions and 1 deletions
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
|
|
@ -18,7 +18,12 @@ jobs:
|
||||||
- name: Setup Zig
|
- name: Setup Zig
|
||||||
run: |
|
run: |
|
||||||
if ! command -v zig &> /dev/null; then
|
if ! command -v zig &> /dev/null; then
|
||||||
sudo snap install zig --beta --classic
|
ZIG_VERSION=$(curl -s "https://api.github.com/repos/ziglang/zig/releases/latest" | grep -Po '"tag_name": "\K[0-9.]+')
|
||||||
|
wget -qO zig.tar.xz https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz
|
||||||
|
sudo mkdir -p /opt/zig
|
||||||
|
sudo tar xf zig.tar.xz --strip-components=1 -C /opt/zig
|
||||||
|
sudo ln -s /opt/zig/zig /usr/local/bin/zig
|
||||||
|
rm -f zig.tar.xz
|
||||||
fi
|
fi
|
||||||
zig version
|
zig version
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue