Skip to content

Commit eaf7f9b

Browse files
committed
- build attempt #11
1 parent 1ac353b commit eaf7f9b

File tree

2 files changed

+34
-39
lines changed

2 files changed

+34
-39
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -108,33 +108,37 @@ jobs:
108108
run: npx electron-builder --linux --x64 -c.linux.target=AppImage
109109

110110
- name: Build Electron app (Mac)
111-
if: matrix.os == 'macos-12'
111+
if: matrix.os == 'macos-14'
112112
env:
113113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114114
run: npx electron-builder --mac --universal
115115

116-
- name: List and prepare artifacts
116+
- name: List build artifacts (Windows)
117+
if: matrix.os == 'windows-latest'
118+
shell: pwsh
117119
run: |
118-
echo "📁 Current directory: $(pwd)"
119-
echo "📁 All files in root:"
120-
find . -maxdepth 2 -type f -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" | head -20
121-
echo ""
122-
echo "📁 Build directory:"
123-
ls -la build/ 2>/dev/null || echo "No build directory"
120+
Write-Host "📁 Build directory contents:"
121+
Get-ChildItem -Path "build" -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.Name }
122+
Write-Host ""
123+
Write-Host "📁 Dist directory contents:"
124+
Get-ChildItem -Path "dist" -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.Name }
125+
126+
- name: List build artifacts (Linux/Mac)
127+
if: matrix.os != 'windows-latest'
128+
run: |
129+
echo "📁 Build directory contents:"
130+
ls -la build/ 2>/dev/null || echo "No build directory found"
124131
echo ""
125-
echo "📁 Dist directory:"
126-
ls -la dist/ 2>/dev/null || echo "No dist directory"
127-
128-
# Copy all artifacts to a consistent location
129-
mkdir -p release-artifacts
130-
find . -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" | xargs -I {} cp {} release-artifacts/ 2>/dev/null || true
131-
echo "✅ Artifacts copied to release-artifacts/"
132+
echo "📁 Dist directory contents:"
133+
ls -la dist/ 2>/dev/null || echo "No dist directory found"
132134
133135
- name: Upload build artifacts
134136
uses: actions/upload-artifact@v4
135137
with:
136138
name: ori-launcher-${{ matrix.platform }}
137-
path: release-artifacts/*
139+
path: |
140+
build/*
141+
dist/*
138142
retention-days: 30
139143

140144
create-release:
@@ -148,40 +152,31 @@ jobs:
148152
with:
149153
path: ./artifacts
150154

151-
- name: Find and prepare release assets
155+
- name: List downloaded artifacts
152156
run: |
153-
echo "🔍 Searching for artifacts..."
154-
find ./artifacts -type f -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" > artifact-list.txt
155-
echo "📦 Found artifacts:"
156-
cat artifact-list.txt
157+
echo "📦 Downloaded artifacts:"
158+
find ./artifacts -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" | sort
157159
echo ""
158-
159-
# Create release directory with all assets
160-
mkdir -p release-assets
161-
while IFS= read -r file; do
162-
if [ -f "$file" ]; then
163-
filename=$(basename "$file")
164-
cp "$file" "release-assets/$filename"
165-
echo "✅ Copied: $filename"
166-
fi
167-
done < artifact-list.txt
168-
169-
echo "🎯 Final release assets:"
170-
ls -la release-assets/
160+
echo "📊 File sizes:"
161+
find ./artifacts -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" -exec ls -lh {} \;
171162
172-
- name: Delete existing release (if any)
163+
- name: Delete existing release to avoid 422 error
173164
run: |
174-
# Delete the release if it already exists to avoid 422 errors
165+
# Delete release if it exists to prevent "immutable release" error
175166
curl -X DELETE \
176167
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
177168
-H "Accept: application/vnd.github.v3+json" \
178169
"https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }}" \
179-
|| echo "No existing release to delete"
170+
|| echo "No existing release to delete (this is ok)"
180171
181172
- name: Create GitHub Release
182173
uses: softprops/action-gh-release@v1
183174
with:
184-
files: release-assets/*
175+
files: |
176+
./artifacts/**/*.exe
177+
./artifacts/**/*.dmg
178+
./artifacts/**/*.AppImage
179+
./artifacts/**/*.zip
185180
generate_release_notes: true
186181
draft: false
187182
prerelease: false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ori-launcher",
3-
"version": "1.3.4",
3+
"version": "1.3.5",
44
"description": "Modern Custom Minecraft launcher",
55
"author": {
66
"name": "Cosmic-fi (Cosmic Boucher)",

0 commit comments

Comments
 (0)