mirror of
https://github.com/ivuorinen/hiha-arvio.git
synced 2026-02-16 00:50:20 +00:00
ci: Add GitHub workflows for test, build, and publish
Add comprehensive CI/CD workflows: **Test Workflow (test.yml)** - Runs on push/PR to main/develop - Executes all 189 xUnit tests on Ubuntu runner - Publishes test results and artifacts - Fast and cost-effective validation **Build Workflow (build.yml)** - Builds for iOS and macOS Catalyst - Runs on macOS-14 runners (Apple Silicon) - Parallel builds for all platforms - Uploads build artifacts (7-day retention) - Overall build status reporting **Publish Workflow (publish.yml)** - Triggered by version tags (v*.*.*) - Creates GitHub releases with changelogs - Builds signed releases for distribution - Uploads iOS and macOS .zip artifacts - Supports pre-release detection (alpha/beta/rc) - Manual workflow dispatch option Features: - .NET 8.0 with MAUI workload - Parallel job execution for performance - Artifact management and retention - Test result reporting - Release automation with version tracking - Comprehensive documentation in workflows/README.md Platforms supported: - iOS 15.0+ (iossimulator-arm64) - macOS 12.0+ Catalyst (maccatalyst-arm64) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
90
.github/workflows/build.yml
vendored
Normal file
90
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-ios:
|
||||
name: Build iOS
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Install MAUI workload
|
||||
run: dotnet workload install maui --source https://api.nuget.org/v3/index.json
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore HihaArvio.sln
|
||||
|
||||
- name: Build iOS
|
||||
run: dotnet build src/HihaArvio/HihaArvio.csproj -f net8.0-ios -c Release /p:ArchiveOnBuild=false /p:EnableCodeSigning=false
|
||||
|
||||
- name: Upload iOS build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ios-build
|
||||
path: |
|
||||
src/HihaArvio/bin/Release/net8.0-ios/**/*.app
|
||||
src/HihaArvio/bin/Release/net8.0-ios/**/*.ipa
|
||||
retention-days: 7
|
||||
|
||||
build-maccatalyst:
|
||||
name: Build macOS Catalyst
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Install MAUI workload
|
||||
run: dotnet workload install maui --source https://api.nuget.org/v3/index.json
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore HihaArvio.sln
|
||||
|
||||
- name: Build macOS Catalyst
|
||||
run: dotnet build src/HihaArvio/HihaArvio.csproj -f net8.0-maccatalyst -c Release /p:ArchiveOnBuild=false /p:EnableCodeSigning=false
|
||||
|
||||
- name: Upload macOS build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: maccatalyst-build
|
||||
path: |
|
||||
src/HihaArvio/bin/Release/net8.0-maccatalyst/**/*.app
|
||||
src/HihaArvio/bin/Release/net8.0-maccatalyst/**/*.pkg
|
||||
retention-days: 7
|
||||
|
||||
build-status:
|
||||
name: Build Status
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-ios, build-maccatalyst]
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
- name: Check build status
|
||||
run: |
|
||||
if [[ "${{ needs.build-ios.result }}" == "success" ]] && [[ "${{ needs.build-maccatalyst.result }}" == "success" ]]; then
|
||||
echo "✅ All builds succeeded"
|
||||
exit 0
|
||||
else
|
||||
echo "❌ One or more builds failed"
|
||||
echo "iOS: ${{ needs.build-ios.result }}"
|
||||
echo "macOS Catalyst: ${{ needs.build-maccatalyst.result }}"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user