Skip to content

Commit 960672e

Browse files
committed
Refactor deploy workflow to enhance logging for cloned repositories and update release notes format
1 parent 8dd42e3 commit 960672e

File tree

1 file changed

+48
-23
lines changed

1 file changed

+48
-23
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
default_bump: patch
2828
release_branches: main,master
2929

30-
# --- 2. SETUP ENVIRONMENT ---
3130
- name: Setup Python
3231
uses: actions/setup-python@v5
3332
with:
@@ -38,24 +37,46 @@ jobs:
3837
New-Item -ItemType Directory -Force -Path "Build\Admin\Mods"
3938
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\Documents\Battlefield 3\Server\Admin\Mods"
4039
41-
# --- 3. CLONE REPOS ---
40+
# --- 3. CLONE & LOGGING ---
4241
- name: Clone RealityMod & Mods
4342
working-directory: Build/Admin/Mods
4443
env:
4544
GH_TOKEN: ${{ secrets.GH_PAT }}
4645
run: |
46+
# Clone
4747
git clone --recurse-submodules https://oauth2:$env:GH_TOKEN@github.com/BF3RM/RealityMod.git
4848
git clone https://oauth2:$env:GH_TOKEN@github.com/BF3RM/BlueprintManager.git
4949
git clone https://oauth2:$env:GH_TOKEN@github.com/BF3RM/VEManager.git
5050
51+
# --- LOGGING: Capture Commits for Release Notes ---
52+
53+
cd RealityMod
54+
$rm_log = git log -1 --format="%h - %s"
55+
echo "RM_LOG=$rm_log" >> $env:GITHUB_ENV
56+
cd ..
57+
58+
cd BlueprintManager
59+
$bp_log = git log -1 --format="%h - %s"
60+
echo "BP_LOG=$bp_log" >> $env:GITHUB_ENV
61+
cd ..
62+
63+
cd VEManager
64+
$ve_log = git log -1 --format="%h - %s"
65+
echo "VE_LOG=$ve_log" >> $env:GITHUB_ENV
66+
5167
- name: Clone RMLevelLoaderGen
5268
working-directory: ${{ github.workspace }}
5369
env:
5470
GH_TOKEN: ${{ secrets.GH_PAT }}
5571
run: |
5672
git clone --recurse-submodules https://oauth2:$env:GH_TOKEN@github.com/BF3RM/RMLevelLoaderGen.git temp_loader
73+
74+
# --- LOGGING ---
75+
cd temp_loader
76+
$ll_log = git log -1 --format="%h - %s"
77+
echo "LL_LOG=$ll_log" >> $env:GITHUB_ENV
5778
58-
# --- 4. CACHE LOGIC: getting commit hash of level loader ---
79+
# --- 4. CACHE LOGIC: LEVEL LOADER ---
5980
- name: Get LevelLoader Commit Hash
6081
id: levelloader_hash
6182
working-directory: temp_loader
@@ -74,20 +95,17 @@ jobs:
7495
if: steps.cache-levelloader.outputs.cache-hit != 'true'
7596
working-directory: temp_loader
7697
run: |
77-
Write-Host "Cache miss! New commit detected. Running LevelLoader Generator..."
98+
# Mark as Updated for Release Notes
99+
echo "LL_STATUS=**(UPDATED)**" >> $env:GITHUB_ENV
78100
79-
# Patch Bat File (Fix slashes and remove pause)
80101
$content = Get-Content generate.bat -Raw
81102
$content = $content -replace 'pause', 'REM pause'
82103
$content = $content -replace '/', '\'
83104
Set-Content -Path generate.bat -Value $content
84105
85-
# Execute
86106
cmd /c generate.bat
87107
88-
# Move Output to the Build Directory (So Cache can find it to save it)
89108
$Dest = "..\Build\Admin\Mods\rm-levelloader"
90-
91109
if (Test-Path "mods\rm-levelloader") {
92110
Move-Item -Path "mods\rm-levelloader" -Destination $Dest -Force
93111
} elseif (Test-Path "$env:USERPROFILE\Documents\Battlefield 3\Server\Admin\Mods\RMLevelLoaderGen\mods\rm-levelloader") {
@@ -102,7 +120,6 @@ jobs:
102120
uses: actions/cache@v4
103121
with:
104122
path: Build/Admin/Mods/RealityMod/ui.vuic
105-
# Key depends on Vextpack files AND the pnpm lockfile
106123
key: webui-vuic-${{ hashFiles('vextpack/**', 'Build/Admin/Mods/RealityMod/WebUI/pnpm-lock.yaml') }}
107124

108125
# --- 6. BUILD WEB UI (Only on Cache Miss) ---
@@ -124,18 +141,14 @@ jobs:
124141
if: steps.cache-webui.outputs.cache-hit != 'true'
125142
working-directory: Build/Admin/Mods/RealityMod/WebUI
126143
run: |
127-
Write-Host "Cache miss! WebUI files changed. Rebuilding..."
128-
pnpm install
144+
# Mark as Updated for Release Notes
145+
echo "RM_STATUS=**(UPDATED)**" >> $env:GITHUB_ENV
129146
130-
# Inject Vextpack
147+
pnpm install
131148
$Source = "${{ github.workspace }}\vextpack"
132149
$Dest = "node_modules\vextpack"
133-
if (Test-Path $Source) {
134-
Copy-Item -Path $Source -Destination $Dest -Recurse -Force
135-
}
136-
150+
if (Test-Path $Source) { Copy-Item -Path $Source -Destination $Dest -Recurse -Force }
137151
pnpm build
138-
139152
if (-not (Test-Path "..\ui.vuic")) { Write-Error "FAILURE: ui.vuic missing"; exit 1 }
140153
141154
# --- 7. CONFIG FILES ---
@@ -203,7 +216,7 @@ jobs:
203216
vars.teamKillValueDecreasePerSecond 0.01
204217
vars.teamKillKickForBan 0
205218
RM.setDevelopers "names" "space" "seperated"
206-
RM.setAdmins "Admin2" "Admin2"
219+
RM.setAdmins "Admin1" "Admin2"
207220
RM.setLightAdmins "LightAdmin1" "LightAdmin2"
208221
RM.serverInfo "Sample RM Server Info"
209222
RM.serverLicenseKey $env:LIC_KEY
@@ -224,15 +237,27 @@ jobs:
224237
# --- 8. PACKAGE & RELEASE ---
225238
- name: Create Zip Packages
226239
run: |
227-
Compress-Archive -Path Build\* -DestinationPath realityMod-Server-Full.zip
228-
Compress-Archive -Path Build\Admin\Mods\* -DestinationPath realityMod-Mods-Only.zip
240+
Compress-Archive -Path Build\* -DestinationPath Reality-Server-Full.zip
241+
Compress-Archive -Path Build\Admin\Mods\* -DestinationPath Reality-Mods-Only.zip
229242
230243
- name: Create Release
231244
uses: softprops/action-gh-release@v1
232245
with:
233246
tag_name: ${{ steps.tag_version.outputs.new_tag }}
234247
name: Release ${{ steps.tag_version.outputs.new_tag }}
235-
body: "Automated release."
236248
files: |
237-
realityMod-Server-Full.zip
238-
realityMod-Mods-Only.zip
249+
Reality-Server-Full.zip
250+
Reality-Mods-Only.zip
251+
body: |
252+
Automated Release ${{ steps.tag_version.outputs.new_tag }}
253+
254+
### 📦 Component Status
255+
| Component | Status | Version (Commit) |
256+
| :--- | :--- | :--- |
257+
| **RealityMod** | ${{ env.RM_STATUS }} | `${{ env.RM_LOG }}` |
258+
| **LevelLoader** | ${{ env.LL_STATUS }} | `${{ env.LL_LOG }}` |
259+
| **BlueprintManager** | (Included) | `${{ env.BP_LOG }}` |
260+
| **VEManager** | (Included) | `${{ env.VE_LOG }}` |
261+
262+
### 🔧 Bundler Changelog
263+
${{ steps.tag_version.outputs.changelog }}

0 commit comments

Comments
 (0)