Build Timer Plus #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Timer Plus | |
| permissions: | |
| contents: write | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm run package:win | |
| - name: Upload Windows installer to release | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| $installer = Get-Item -LiteralPath 'dist\Timer-Plus-1.0.0-win-x64.exe' | |
| $hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $installer.FullName).Hash.ToLowerInvariant() | |
| "$hash $($installer.Name)" | Set-Content -Encoding utf8 -LiteralPath 'dist\SHA256SUMS-windows.txt' | |
| gh release upload v1.0.0 $installer.FullName 'dist\SHA256SUMS-windows.txt' --clobber --repo $env:GITHUB_REPOSITORY | |
| macos-intel: | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm run package:mac:x64:dir | |
| - name: Verify Intel application signature | |
| run: | | |
| app_bundle="$(find dist/mac -maxdepth 1 -name '*.app' -type d | head -n 1)" | |
| test -n "$app_bundle" | |
| codesign --verify --deep --strict --verbose=4 "$app_bundle" | |
| codesign --display --verbose=4 "$app_bundle" 2>&1 | |
| codesign --display --entitlements :- "$app_bundle" 2>&1 | |
| - name: Smoke-test Intel application | |
| run: | | |
| app_binary="$(find dist/mac -path '*/Contents/MacOS/*' -type f -perm +111 | head -n 1)" | |
| test -n "$app_binary" | |
| "$app_binary" > /tmp/timer-plus.log 2>&1 & | |
| app_pid=$! | |
| sleep 12 | |
| if ! kill -0 "$app_pid" 2>/dev/null; then | |
| cat /tmp/timer-plus.log | |
| crash_report="$(find "$HOME/Library/Logs/DiagnosticReports" -type f -name '*.ips' -mmin -5 | sort | tail -n 1)" | |
| if test -n "$crash_report"; then cat "$crash_report"; fi | |
| wait "$app_pid" || true | |
| exit 1 | |
| fi | |
| kill "$app_pid" | |
| wait "$app_pid" || true | |
| macos-release: | |
| needs: macos-intel | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm run package:mac | |
| - name: Verify Apple Silicon application signature | |
| run: | | |
| app_bundle="$(find dist/mac-arm64 -maxdepth 1 -name '*.app' -type d | head -n 1)" | |
| test -n "$app_bundle" | |
| codesign --verify --deep --strict --verbose=4 "$app_bundle" | |
| codesign --display --verbose=4 "$app_bundle" 2>&1 | |
| codesign --display --entitlements :- "$app_bundle" 2>&1 | |
| - name: Smoke-test Apple Silicon application | |
| run: | | |
| app_binary="$(find dist/mac-arm64 -path '*/Contents/MacOS/*' -type f -perm +111 | head -n 1)" | |
| test -n "$app_binary" | |
| "$app_binary" > /tmp/timer-plus.log 2>&1 & | |
| app_pid=$! | |
| sleep 12 | |
| if ! kill -0 "$app_pid" 2>/dev/null; then | |
| cat /tmp/timer-plus.log | |
| crash_report="$(find "$HOME/Library/Logs/DiagnosticReports" -type f -name '*.ips' -mmin -5 | sort | tail -n 1)" | |
| if test -n "$crash_report"; then cat "$crash_report"; fi | |
| wait "$app_pid" || true | |
| exit 1 | |
| fi | |
| kill "$app_pid" | |
| wait "$app_pid" || true | |
| - name: Upload macOS installers to release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| cd dist | |
| shasum -a 256 *.dmg *.zip > SHA256SUMS-macos.txt | |
| gh release upload v1.0.0 ./*.dmg ./*.zip ./SHA256SUMS-macos.txt --clobber --repo "$GITHUB_REPOSITORY" |