@@ -6,7 +6,7 @@ branding:
66
77inputs :
88 version :
9- description : ' Version of Roc to install (e.g., "nightly", "alpha4-rolling")'
9+ description : ' Version of Roc to install (e.g., "nightly", "nightly-new-compiler", " alpha4-rolling")'
1010 required : true
1111
1212runs :
@@ -97,20 +97,33 @@ runs:
9797 alpha4-rolling-macos_apple_silicon)
9898 EXPECTED_SHA="416fbd983280eda11ac87b0947e27bf0a86d186a94baebeb71e163942bb5bd84"
9999 ;;
100+ nightly-new-compiler-*)
101+ # New compiler nightly builds - no SHA verification
102+ ;;
100103 nightly-*)
101104 # Nightly builds - no SHA verification
102105 ;;
103106 *)
104107 echo "Error: Unsupported version: $VERSION"
105- echo "Supported versions: nightly, alpha3-rolling, alpha4-rolling"
108+ echo "Supported versions: nightly, nightly-new-compiler, alpha3-rolling, alpha4-rolling"
106109 echo "Make sure your version is listed in https://github.com/roc-lang/roc/tags and try updating to"
107110 echo "the latest commit of the setup-roc action, see <https://github.com/roc-lang/setup-roc>."
108111 exit 1
109112 ;;
110113 esac
111114
112115 # Download Roc
113- if [[ "$VERSION" == "nightly" ]]; then
116+ if [[ "$VERSION" == "nightly-new-compiler" ]]; then
117+ # Fetch the latest release from roc-lang/nightlies and find the asset for our platform
118+ DOWNLOAD_URL=$(curl -fsSL "https://api.github.com/repos/roc-lang/nightlies/releases/latest" | \
119+ jq -r ".assets[] | select(.name | contains(\"${PLATFORM}\")) | select(.name | endswith(\".tar.gz\")) | .browser_download_url")
120+ if [[ -z "$DOWNLOAD_URL" ]]; then
121+ echo "Error: Could not find a nightly-new-compiler release for platform: $PLATFORM"
122+ exit 1
123+ fi
124+ SKIP_SHA_CHECK=true
125+ DIR_PATTERN="roc_nightly-${PLATFORM}-*"
126+ elif [[ "$VERSION" == "nightly" ]]; then
114127 DOWNLOAD_URL="https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-${PLATFORM}-latest.tar.gz"
115128 SKIP_SHA_CHECK=true
116129 DIR_PATTERN="roc_nightly-${PLATFORM}-*"
0 commit comments