Pack LeviLamina #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pack LeviLamina | |
on: | |
workflow_dispatch: | |
inputs: | |
LL_VER: | |
description: 'LeviLamina version' | |
required: true | |
default: '0.13.5' | |
LSE: | |
description: 'If include LSE' | |
required: false | |
default: 'false' | |
RUNTIME: | |
description: 'If include runtime for LeviLamina' | |
required: false | |
default: 'false' | |
SCRIPTS: | |
description: 'If use user_scripts' | |
required: false | |
default: 'false' | |
jobs: | |
Pack: | |
permissions: | |
contents: write | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- name: π‘ Check Out Repo | |
uses: actions/checkout@v3 | |
- name: π οΈ Install Lip & Prepare Environment | |
run: | | |
mkdir ll | |
mkdir fakecmd | |
mv .\LICENSE .\ll\LL_Easier_LICENSE | |
Invoke-WebRequest -Uri https://github.com/futrime/lip/releases/latest/download/lip-windows-amd64.zip -Outfile .\scripts\lip.zip | |
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z2401-x64.exe -Outfile .\scripts\7z_installer.exe | |
.\scripts\7z_installer.exe | |
unzip .\scripts\lip.zip -d .\scripts\ | |
echo "@echo off" > .\fakecmd\cmd.bat | |
"$env:GITHUB_WORKSPACE\scripts" | Out-File -FilePath $env:GITHUB_PATH -Append | |
- name: π§° Install LeviLamina | |
working-directory: ll | |
run: | | |
$env:PATH = "$($env:GITHUB_WORKSPACE)\scripts;$($env:GITHUB_WORKSPACE)\fakecmd" | |
lip.exe install -y github.com/LiteLDev/LeviLamina@${{ github.event.inputs.LL_VER }} | |
- name: βοΈ Install LSE | |
working-directory: ll | |
if: github.event.inputs.LSE == 'true' | |
run: | | |
lip.exe install -y github.com/LiteLDev/LegacyScriptEngine | |
lip.exe install -y gitea.litebds.com/LiteLDev/legacy-script-engine-nodejs | |
lip.exe install -y gitea.litebds.com/LiteLDev/legacy-script-engine-python | |
- name: π§ Install Runtime | |
working-directory: ll | |
if: github.event.inputs.RUNTIME == 'true' | |
run: | | |
Invoke-WebRequest -Uri https://aka.ms/vs/17/release/vc_redist.x64.exe -Outfile .\runtime_for_levilamina.exe | |
- name: π Run User's Scripts | |
working-directory: ll | |
if: github.event.inputs.SCRIPTS == 'true' | |
run: | | |
user_scripts.ps1 | |
- name: π Get BDS Version | |
id: get_bds_core_version | |
working-directory: ll | |
run: | | |
$res = Get-content -Raw -Path "./.lip/metadata/github.com%2FLiteLDev%2Fbds.json" |ConvertFrom-Json | |
"bds_core_version=$($res.version)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | |
rm .\bdsdown.exe -Force | |
- name: π¦ Pack Files | |
run: | | |
7z a ll_${{ github.event.inputs.LL_VER }}-bds_${{ steps.get_bds_core_version.outputs.bds_core_version }}.zip .\ll\ | |
- name: π Upload Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ll_${{ github.event.inputs.LL_VER }}-bds_${{ steps.get_bds_core_version.outputs.bds_core_version }}.zip | |
name: LeviLamina Packed - ${{ github.event.inputs.LL_VER }} (Legacy) | |
tag_name: ${{ github.event.inputs.LL_VER }} | |
body: | | |
LeviLamina version: ${{ github.event.inputs.LL_VER }} | |
BDS core needed version: ${{ steps.get_bds_core_version.outputs.bds_core_version }} | |
Include LSE: ${{ github.event.inputs.LSE }} | |
Include Runtime: ${{ github.event.inputs.RUNTIME }} | |
Use user_scripts.bat: ${{ github.event.inputs.SCRIPTS }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |