Skip to content

Commit 7c75782

Browse files
committed
fix: correct checksum file path in validation (cd .. instead of cd ../..)
1 parent 7c696b7 commit 7c75782

File tree

2 files changed

+7
-118
lines changed

2 files changed

+7
-118
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,12 @@ jobs:
385385
fi
386386
done
387387
388-
# Check checksum file
389-
cd ../..
388+
# Check checksum file (go back to bundle directory, not release)
389+
cd ..
390390
CHECKSUM_FILE="checksums-linux.txt"
391391
if [ ! -f "$CHECKSUM_FILE" ]; then
392392
echo "❌ Error: Checksum file not found at: $(pwd)/$CHECKSUM_FILE"
393-
echo "Contents of bundle directory:"
393+
echo "Contents of current directory:"
394394
ls -la . || true
395395
exit 1
396396
fi

.github/workflows/test-release-validation.yml

Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ jobs:
9999
fi
100100
done
101101
102-
# Check checksum file
103-
cd ../..
102+
# Check checksum file (go back to bundle directory, not release)
103+
cd ..
104104
CHECKSUM_FILE="checksums-linux.txt"
105105
if [ ! -f "$CHECKSUM_FILE" ]; then
106106
echo "❌ Error: Checksum file not found at: $(pwd)/$CHECKSUM_FILE"
107-
echo "Contents of bundle directory:"
107+
echo "Contents of current directory:"
108108
ls -la . || true
109109
exit 1
110110
fi
@@ -131,120 +131,9 @@ jobs:
131131
echo "📁 Final bundle structure:"
132132
ls -laR src-tauri/target/release/bundle/
133133
134-
test-windows-validation:
135-
runs-on: windows-2022-16-cores
136-
137-
steps:
138-
- name: Checkout code
139-
uses: actions/checkout@v5
140-
141-
- name: Setup Node.js
142-
uses: actions/setup-node@v5
143-
with:
144-
node-version: '20'
145-
cache: 'npm'
146-
147-
- name: Setup Rust
148-
uses: dtolnay/rust-toolchain@stable
149-
150-
- name: Install dependencies
151-
run: npm ci
152-
153-
- name: Build Tauri app
154-
run: npm run tauri build
155-
156-
- name: Generate checksums
157-
shell: pwsh
158-
run: |
159-
cd src-tauri/target/release/bundle/msi
160-
161-
# Verify MSI files exist
162-
$msiFiles = Get-ChildItem -Filter *.msi
163-
if ($msiFiles.Count -eq 0) {
164-
Write-Host "❌ Error: No MSI files found for checksum generation"
165-
exit 1
166-
}
167-
168-
Write-Host "📦 Found $($msiFiles.Count) MSI file(s)"
169-
170-
# Generate checksums
171-
$msiFiles | ForEach-Object {
172-
$hash = Get-FileHash $_.FullName -Algorithm SHA256
173-
"$($hash.Hash) $($_.Name)"
174-
} | Out-File -FilePath ..\checksums-windows.txt -Encoding UTF8
175-
176-
# Verify checksum file was created and is not empty
177-
$checksumFile = "..\checksums-windows.txt"
178-
if (-not (Test-Path $checksumFile)) {
179-
Write-Host "❌ Error: Checksum file was not created"
180-
exit 1
181-
}
182-
183-
$fileSize = (Get-Item $checksumFile).Length
184-
if ($fileSize -eq 0) {
185-
Write-Host "❌ Error: Checksum file is empty"
186-
exit 1
187-
}
188-
189-
Write-Host "✅ Checksums generated ($fileSize bytes):"
190-
Get-Content $checksumFile
191-
192-
- name: Validate Windows artifacts
193-
shell: pwsh
194-
run: |
195-
$msiPath = "src-tauri/target/release/bundle/msi"
196-
$checksumPath = "src-tauri/target/release/bundle/checksums-windows.txt"
197-
198-
Write-Host "🔍 Validating Windows artifacts..."
199-
200-
# Check MSI files
201-
$msiFiles = Get-ChildItem -Path $msiPath -Filter *.msi
202-
if ($msiFiles.Count -eq 0) {
203-
Write-Host "❌ Error: No MSI files found"
204-
exit 1
205-
}
206-
207-
foreach ($msi in $msiFiles) {
208-
$sizeMB = [math]::Round($msi.Length / 1MB, 2)
209-
Write-Host "✅ $($msi.Name): $sizeMB MB"
210-
211-
if ($msi.Length -lt 1MB) {
212-
Write-Host "❌ Error: MSI file is suspiciously small"
213-
exit 1
214-
}
215-
}
216-
217-
# Check checksum file
218-
if (-not (Test-Path $checksumPath)) {
219-
Write-Host "❌ Error: Checksum file not found"
220-
exit 1
221-
}
222-
223-
$checksumSize = (Get-Item $checksumPath).Length
224-
if ($checksumSize -eq 0) {
225-
Write-Host "❌ Error: Checksum file is empty"
226-
exit 1
227-
}
228-
229-
Write-Host "✅ Checksum file: $checksumSize bytes"
230-
Write-Host "✅ All Windows artifact validations passed!"
231-
232-
- name: Test artifact upload structure
233-
uses: actions/upload-artifact@v4
234-
with:
235-
name: test-windows-installers
236-
path: |
237-
src-tauri/target/release/bundle/msi/*.msi
238-
src-tauri/target/release/bundle/checksums-windows.txt
239-
240-
- name: Show final structure
241-
shell: pwsh
242-
run: |
243-
Write-Host "📁 Final bundle structure:"
244-
Get-ChildItem -Recurse src-tauri/target/release/bundle/
245134
246135
test-artifact-download:
247-
needs: [test-linux-validation, test-windows-validation]
136+
needs: [test-linux-validation]
248137
runs-on: ubicloud-standard-8
249138

250139
steps:

0 commit comments

Comments
 (0)