diff --git a/package/action/action.yml b/package/action/action.yml new file mode 100644 index 0000000..43ab6fe --- /dev/null +++ b/package/action/action.yml @@ -0,0 +1,16 @@ +name: "setup-lune" +description: "Installs lune - the standalone luau runtime" +branding: + icon: "terminal" + color: "purple" +inputs: + version: + description: "Version of lune to install, defaults to latest" + required: false +runs: + using: "composite" + steps: + - run: "wget https://github.com/CompeyDev/setup-lune/releases/download/latest/setup-lune-${{ runner.os }}-x86_64.zip" + - run: "unzip setup-lune-${{ runner.os }}-x86_64.zip" + - run: "chmod +X ./setup-lune && ./setup-lune" + - run: "rm -rf ./setup-lune" diff --git a/package/action/src/download.rs b/package/action/src/download.rs index e0aa6ad..d3ae05d 100644 --- a/package/action/src/download.rs +++ b/package/action/src/download.rs @@ -124,7 +124,7 @@ pub fn download_release(version: Option) -> Result<(PathBuf, LuneRelease Ok((PathBuf::from(&parsed_release_data.artifact_name), parsed_release_data)) } -pub fn install_lune(lune_archive_reader: impl Read + Seek, meta: LuneReleaseFetched) -> Result<()> { +pub fn install_lune(lune_archive_reader: impl Read + Seek, meta: LuneReleaseFetched) -> Result { const TARGET: &str = "download::install_lune"; tracing::info!(target: TARGET, "Initializing routine"); @@ -171,5 +171,5 @@ pub fn install_lune(lune_archive_reader: impl Read + Seek, meta: LuneReleaseFetc lune_bin_path.to_string_lossy() ); - Ok(()) + Ok(lune_bin_path) }