-
Notifications
You must be signed in to change notification settings - Fork 6
148 lines (132 loc) Β· 4.6 KB
/
pack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Pack LeviLamina
on:
workflow_dispatch:
inputs:
LL_VER:
description: 'LeviLamina version'
required: true
default: '0.1.0'
LSE:
description: 'If include LegacyScriptEngine'
required: false
default: 'false'
RUNTIME:
description: 'If include runtime for LeviLamina'
required: false
default: 'false'
SCRIPTS:
description: 'Use user_scripts.bat'
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
mv .\LICENSE .\ll\LL_Easier_LICENSE
cd .\scripts
Invoke-WebRequest -Uri https://github.com/lippkg/lip/releases/latest/download/lip-windows-amd64.zip -Outfile .\lip.zip
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z2401-x64.exe -Outfile .\7z_installer.exe
.\7z_installer.exe
unzip lip.zip
"$env:GITHUB_WORKSPACE\scripts" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: π§° Install LeviLamina
working-directory: ll
run: |
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: |
# alias lip.exe install -y -> lipin
user_scripts.ps1
- name: π Remove BDS
id: get_bds_core_version
working-directory: ll
run: |
#$file = Get-ChildItem -Path .\.cache\bdsdown\ -File | Select-Object -First 1
#"bds_core_version=$(echo $file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
#Remove-Item -Path $file.FullName
#"bds_core_version=$(echo $get_version.ps1)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
rm .\behavior_packs -Force -Recurse
rm .\definitions -Force -Recurse
rm .\resource_packs -Force -Recurse
rm .\bedrock_* -Force -Recurse
rm .\config -Force -Recurse
rm .\.cache -Force -Recurse
rm .\allowlist.json -Force
rm .\bdsdown.exe -Force
rm .\permissions.json -Force
rm .\release-notes.txt -Force
rm .\server.properties -Force
- name: π¦ Pack Files
run: |
7z a ll_packed.zip .\ll\
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ll_packed
path: 'll_packed.zip'
Release:
permissions: write-all
runs-on: ubuntu-latest
needs: [Pack]
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
repository: FTS427/ll_easier
name: ll_packed
- name: Unzip Artifact
run: |
sudo apt install unzip tree
ls
unzip ll_packed.zip
tree
- name: Get version
uses: FTS427/get_bds_version@main
id: get_version
with:
dotlip_dir: 'll/.lip'
- name: Rename
run: |
mv ll_packed.zip ll_${{ github.event.inputs.LL_VER }}-bds_${{ steps.get_version.outputs.version }}.zip
- name: π Upload Release
uses: softprops/action-gh-release@v1
with:
files: ll_${{ github.event.inputs.LL_VER }}-bds_${{ steps.get_version.outputs.version }}.zip
name: LeviLamina Packed - ${{ github.event.inputs.LL_VER }}
tag_name: ${{ github.event.inputs.LL_VER }}
body: |
LeviLamina version: ${{ github.event.inputs.LL_VER }}
BDS core needed version: ${{ steps.get_version.outputs.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 }}
- name: Remove Artifact
uses: geekyeggo/delete-artifact@v2
with:
name: ll_packed