19
19
with :
20
20
version : 0.13.0
21
21
22
+ - name : Get latest release info
23
+ id : get_release
24
+ run : |
25
+ RELEASE_INFO=$(curl -s https://api.github.com/repos/roc-lang/roc/releases/latest)
26
+ echo "tag_name=$(echo "$RELEASE_INFO" | jq -r .tag_name)" >> $GITHUB_OUTPUT
27
+ echo "assets_url=$(echo "$RELEASE_INFO" | jq -r .assets_url)" >> $GITHUB_OUTPUT
28
+
22
29
- name : Delete everything except ci folder to test the release like a real user would
23
30
run : find . -maxdepth 1 ! -name ci ! -name '.' -exec rm -rf {} +
24
31
@@ -29,20 +36,30 @@ jobs:
29
36
- name : get the latest release archive for linux (x86_64)
30
37
if : startsWith(matrix.os, 'ubuntu') && !endsWith(matrix.os, '-arm')
31
38
run : |
32
- curl -fL https://github.com/roc-lang/roc/releases/download/0.0.0-alpha2-rolling/roc-linux_x86_64-0-alpha2-rolling.tar.gz -o roc_release.tar.gz
39
+ ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
40
+ DOWNLOAD_URL=$(curl -s "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-linux_x86_64-") and (contains("old") | not)) | .browser_download_url')
41
+ curl -fL "$DOWNLOAD_URL" -o roc_release.tar.gz
33
42
34
43
- name : get the latest release archive for linux (arm64)
35
44
if : startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, '-arm')
36
45
run : |
37
- curl -fL https://github.com/roc-lang/roc/releases/download/0.0.0-alpha2-rolling/roc-linux_arm64-0-alpha2-rolling.tar.gz -o roc_release.tar.gz
46
+ ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
47
+ DOWNLOAD_URL=$(curl -s "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-linux_arm64-") and (contains("old") | not)) | .browser_download_url')
48
+ curl -fL "$DOWNLOAD_URL" -o roc_release.tar.gz
38
49
39
50
- name : get the latest release archive for macos 13 (x86_64)
40
51
if : matrix.os == 'macos-13'
41
- run : curl -fL https://github.com/roc-lang/roc/releases/download/0.0.0-alpha2-rolling/roc-macos_x86_64-0-alpha2-rolling.tar.gz -o roc_release.tar.gz
52
+ run : |
53
+ ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
54
+ DOWNLOAD_URL=$(curl -s "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-macos_x86_64-")) | .browser_download_url')
55
+ curl -fL "$DOWNLOAD_URL" -o roc_release.tar.gz
42
56
43
57
- name : get the latest release archive for macos 14 (aarch64)
44
58
if : matrix.os == 'macos-14'
45
- run : curl -fL https://github.com/roc-lang/roc/releases/download/0.0.0-alpha2-rolling/roc-macos_apple_silicon-0-alpha2-rolling.tar.gz -o roc_release.tar.gz
59
+ run : |
60
+ ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
61
+ DOWNLOAD_URL=$(curl -s "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-macos_apple_silicon-")) | .browser_download_url')
62
+ curl -fL "$DOWNLOAD_URL" -o roc_release.tar.gz
46
63
47
64
- run : zig version
48
65
@@ -53,11 +70,15 @@ jobs:
53
70
- name : test with old linux release (x86_64)
54
71
if : startsWith(matrix.os, 'ubuntu') && !endsWith(matrix.os, '-arm')
55
72
run : |
56
- curl -fL https://github.com/roc-lang/roc/releases/download/0.0.0-alpha2-rolling/roc-old_linux_x86_64-0-alpha2-rolling.tar.gz -o roc_release.tar.gz
73
+ ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
74
+ DOWNLOAD_URL=$(curl -s "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-old_linux_x86_64-")) | .browser_download_url')
75
+ curl -fL "$DOWNLOAD_URL" -o roc_release.tar.gz
57
76
./ci/basic_release_test.sh roc_release.tar.gz
58
77
59
78
- name : test with old linux release (arm64)
60
79
if : startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, '-arm')
61
80
run : |
62
- curl -fL https://github.com/roc-lang/roc/releases/download/0.0.0-alpha2-rolling/roc-old_linux_arm64-0-alpha2-rolling.tar.gz -o roc_release.tar.gz
81
+ ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
82
+ DOWNLOAD_URL=$(curl -s "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-old_linux_arm64-")) | .browser_download_url')
83
+ curl -fL "$DOWNLOAD_URL" -o roc_release.tar.gz
63
84
./ci/basic_release_test.sh roc_release.tar.gz
0 commit comments