Skip to content

Commit cecd563

Browse files
authored
Implement comprehensive release workflow tests and update workflow docs (#8)
1 parent 5bdaed5 commit cecd563

7 files changed

Lines changed: 2620 additions & 98 deletions

File tree

.github/workflows/build.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ jobs:
9797
--output ./publish/osx-x64 \
9898
-p:PublishSingleFile=true
9999
100+
- name: Rename executable to 'tom'
101+
run: mv ./publish/osx-x64/TenSecondTom ./publish/osx-x64/tom
102+
100103
- name: Verify artifact size
101104
run: |
102-
FILE_PATH="./publish/osx-x64/TenSecondTom"
105+
FILE_PATH="./publish/osx-x64/tom"
103106
FILE_SIZE=$(stat -f%z "$FILE_PATH")
104107
FILE_SIZE_MB=$((FILE_SIZE / 1024 / 1024))
105108
MAX_SIZE_MB=${{ env.MAX_ARTIFACT_SIZE_MB }}
@@ -118,7 +121,7 @@ jobs:
118121
- name: Calculate checksum
119122
id: checksum
120123
run: |
121-
CHECKSUM=$(shasum -a 256 ./publish/osx-x64/TenSecondTom | cut -d ' ' -f 1)
124+
CHECKSUM=$(shasum -a 256 ./publish/osx-x64/tom | cut -d ' ' -f 1)
122125
echo "sha256=$CHECKSUM" >> $GITHUB_OUTPUT
123126
echo "📝 SHA256: $CHECKSUM"
124127
@@ -127,7 +130,7 @@ jobs:
127130
with:
128131
name: ten-second-tom-osx-x64
129132
path: |
130-
./publish/osx-x64/TenSecondTom
133+
./publish/osx-x64/tom
131134
./publish/osx-x64/appsettings*.json
132135
./publish/osx-x64/*.dylib
133136
retention-days: 90
@@ -161,9 +164,12 @@ jobs:
161164
--output ./publish/osx-arm64 \
162165
-p:PublishSingleFile=true
163166
167+
- name: Rename executable to 'tom'
168+
run: mv ./publish/osx-arm64/TenSecondTom ./publish/osx-arm64/tom
169+
164170
- name: Verify artifact size
165171
run: |
166-
FILE_PATH="./publish/osx-arm64/TenSecondTom"
172+
FILE_PATH="./publish/osx-arm64/tom"
167173
FILE_SIZE=$(stat -f%z "$FILE_PATH")
168174
FILE_SIZE_MB=$((FILE_SIZE / 1024 / 1024))
169175
MAX_SIZE_MB=${{ env.MAX_ARTIFACT_SIZE_MB }}
@@ -182,7 +188,7 @@ jobs:
182188
- name: Calculate checksum
183189
id: checksum
184190
run: |
185-
CHECKSUM=$(shasum -a 256 ./publish/osx-arm64/TenSecondTom | cut -d ' ' -f 1)
191+
CHECKSUM=$(shasum -a 256 ./publish/osx-arm64/tom | cut -d ' ' -f 1)
186192
echo "sha256=$CHECKSUM" >> $GITHUB_OUTPUT
187193
echo "📝 SHA256: $CHECKSUM"
188194
@@ -191,7 +197,7 @@ jobs:
191197
with:
192198
name: ten-second-tom-osx-arm64
193199
path: |
194-
./publish/osx-arm64/TenSecondTom
200+
./publish/osx-arm64/tom
195201
./publish/osx-arm64/appsettings*.json
196202
./publish/osx-arm64/*.dylib
197203
retention-days: 90
@@ -225,10 +231,13 @@ jobs:
225231
--output ./publish/win-x64 `
226232
-p:PublishSingleFile=true
227233
234+
- name: Rename executable to 'tom.exe'
235+
run: Move-Item ./publish/win-x64/TenSecondTom.exe ./publish/win-x64/tom.exe
236+
228237
- name: Verify artifact size
229238
shell: pwsh
230239
run: |
231-
$filePath = "./publish/win-x64/TenSecondTom.exe"
240+
$filePath = "./publish/win-x64/tom.exe"
232241
$fileSize = (Get-Item $filePath).Length
233242
$fileSizeMB = [math]::Round($fileSize / 1MB)
234243
$maxSizeMB = $env:MAX_ARTIFACT_SIZE_MB
@@ -248,7 +257,7 @@ jobs:
248257
shell: pwsh
249258
id: checksum
250259
run: |
251-
$hash = (Get-FileHash -Path ./publish/win-x64/TenSecondTom.exe -Algorithm SHA256).Hash
260+
$hash = (Get-FileHash -Path ./publish/win-x64/tom.exe -Algorithm SHA256).Hash
252261
echo "sha256=$hash" >> $env:GITHUB_OUTPUT
253262
Write-Host "📝 SHA256: $hash"
254263
@@ -257,7 +266,7 @@ jobs:
257266
with:
258267
name: ten-second-tom-win-x64
259268
path: |
260-
./publish/win-x64/TenSecondTom.exe
269+
./publish/win-x64/tom.exe
261270
./publish/win-x64/appsettings*.json
262271
./publish/win-x64/*.dll
263272
retention-days: 90
@@ -341,7 +350,7 @@ jobs:
341350
shell: pwsh
342351
run: |
343352
Write-Host "🧪 Running smoke test: --version"
344-
$output = & ./artifacts/TenSecondTom.exe --version
353+
$output = & ./artifacts/tom.exe --version
345354
346355
if ($LASTEXITCODE -eq 0) {
347356
Write-Host "✅ Smoke test passed: executable runs successfully"

0 commit comments

Comments
 (0)