Skip to content

Commit 409fbca

Browse files
committed
fix: downgrade actions/checkout version to v4 and add installation steps for Nature
1 parent ebae3eb commit 409fbca

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,26 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v6
14+
uses: actions/checkout@v4
15+
16+
- name: Install Nature
17+
run: |
18+
set -euo pipefail
19+
release_json="$(curl -fsSL https://api.github.com/repos/nature-lang/nature/releases/latest)"
20+
asset_url="$(printf '%s' "$release_json" | grep -Eo 'https://[^"[:space:]]*nature-v[^"[:space:]]*-linux-amd64\.tar\.gz' | head -n 1)"
21+
22+
if [ -z "$asset_url" ]; then
23+
echo "Could not find a linux-amd64 Nature release asset"
24+
exit 1
25+
fi
26+
27+
curl -fsSL "$asset_url" -o nature.tar.gz
28+
tar -xzf nature.tar.gz
29+
sudo mv nature /usr/local/nature
30+
echo "/usr/local/nature/bin" >> "$GITHUB_PATH"
31+
32+
- name: Verify Nature
33+
run: nature --version
1534

1635
- name: Ensure test script is executable
1736
run: chmod +x tests/run_tests.sh

0 commit comments

Comments
 (0)