Skip to content

Add comprehensive GitHub Actions CI/CD workflows for MAUI application publishing#1

Merged
chabiss merged 2 commits intomainfrom
copilot/fix-227b0d55-08d1-459f-98a1-3c59c5eb6d64
Aug 29, 2025
Merged

Add comprehensive GitHub Actions CI/CD workflows for MAUI application publishing#1
chabiss merged 2 commits intomainfrom
copilot/fix-227b0d55-08d1-459f-98a1-3c59c5eb6d64

Conversation

Copy link
Contributor

Copilot AI commented Aug 29, 2025

This PR implements a complete CI/CD pipeline for the Periodic Table MAUI application, enabling automated builds and releases across multiple platforms.

Overview

The solution adds two GitHub Actions workflows under .github/workflows/ to handle continuous integration and publishing for both the MAUI Controls and Blazor Hybrid versions of the application.

What's Added

1. Publishing Workflow (publish.yml)

A comprehensive build and release workflow that:

  • Multi-platform support: Builds for Android, Windows, macOS Catalyst, and iOS
  • Matrix strategy: Handles both PeriodicTableMaui (Controls) and PeriodicTableBlazorMaui (Blazor Hybrid) projects
  • Automatic releases: Creates GitHub releases when version tags are pushed (e.g., v1.0.0)
  • Artifact management: Uploads build artifacts with 30-day retention
  • Manual dispatch: Allows manual workflow execution with optional release creation

Supported platforms:

  • Android (both MAUI Controls and Blazor Hybrid)
  • Windows (both MAUI Controls and Blazor Hybrid)
  • macOS Catalyst (both MAUI Controls and Blazor Hybrid)
  • iOS (Blazor Hybrid only)

2. CI Workflow (ci.yml)

A fast continuous integration workflow for development that:

  • Build validation: Ensures the solution builds correctly
  • Platform testing: Validates Android and Windows builds specifically
  • Test execution: Runs available tests (with graceful handling if none exist)
  • Quick feedback: Provides rapid validation for pull requests

3. Documentation (README.md)

Comprehensive documentation explaining:

  • Workflow purposes and triggers
  • Platform support matrix
  • Usage instructions for creating releases
  • Artifact download guidance

Workflow Triggers

Publishing Workflow:

  • Version tags matching v*.*.* pattern
  • Pushes to main branch
  • Pull requests to main branch
  • Manual workflow dispatch

CI Workflow:

  • Pushes to main or develop branches
  • Pull requests to main branch

Technical Implementation

The workflows automatically handle:

  • .NET 9.0 SDK installation
  • MAUI workload installation
  • Multi-target framework builds
  • Cross-platform artifact generation
  • Release packaging (both .tar.gz and .zip formats)

Usage Examples

Create a release:

git tag v1.0.0
git push origin v1.0.0

Manual build:
Navigate to Actions → "Build and Publish" → "Run workflow"

This implementation provides a robust foundation for automated application delivery across all supported MAUI platforms, enabling seamless releases and consistent build validation for the development workflow.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@chabiss chabiss marked this pull request as ready for review August 29, 2025 00:59
Co-authored-by: chabiss <14151258+chabiss@users.noreply.github.com>
@chabiss chabiss requested a review from Copilot August 29, 2025 01:01
Copilot AI changed the title [WIP] I need to create a publishing workflow file under .github/workflow Add comprehensive GitHub Actions CI/CD workflows for MAUI application publishing Aug 29, 2025
Copilot AI requested a review from chabiss August 29, 2025 01:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR creates a comprehensive GitHub Actions CI/CD pipeline for the PeriodicTable MAUI application, implementing automated builds and publishing workflows for cross-platform deployment. The implementation provides multi-platform support with matrix builds and automated release creation.

  • Added complete CI/CD workflow infrastructure with cross-platform builds for Android, Windows, macOS Catalyst, and iOS
  • Implemented automated release creation with artifact packaging and comprehensive release notes
  • Created continuous integration workflow for development validation and testing

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/publish.yml Main publishing workflow with matrix strategy for multi-platform builds and automated release creation
.github/workflows/ci.yml Continuous integration workflow for development validation and platform-specific build testing
.github/workflows/README.md Comprehensive documentation covering workflow usage, platform support, and setup instructions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +89 to +127
- name: Publish project (Windows)
if: matrix.platform == 'windows' || matrix.platform == 'windows-blazor'
run: |
dotnet publish ${{ env.PROJECT_PATH }}/${{ matrix.project }}/${{ matrix.project }}.csproj \
--configuration Release \
--framework ${{ matrix.framework }} \
--output ./publish/${{ matrix.output }} \
--no-restore \
--no-build

- name: Publish project (Android)
if: matrix.platform == 'android' || matrix.platform == 'android-blazor'
run: |
dotnet publish ${{ env.PROJECT_PATH }}/${{ matrix.project }}/${{ matrix.project }}.csproj \
--configuration Release \
--framework ${{ matrix.framework }} \
--output ./publish/${{ matrix.output }} \
--no-restore \
--no-build

- name: Publish project (macOS Catalyst)
if: matrix.platform == 'maccatalyst' || matrix.platform == 'maccatalyst-blazor'
run: |
dotnet publish ${{ env.PROJECT_PATH }}/${{ matrix.project }}/${{ matrix.project }}.csproj \
--configuration Release \
--framework ${{ matrix.framework }} \
--output ./publish/${{ matrix.output }} \
--no-restore \
--no-build

- name: Publish project (iOS)
if: matrix.platform == 'ios'
run: |
dotnet publish ${{ env.PROJECT_PATH }}/${{ matrix.project }}/${{ matrix.project }}.csproj \
--configuration Release \
--framework ${{ matrix.framework }} \
--output ./publish/${{ matrix.output }} \
--no-restore \
--no-build
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish steps contain duplicated logic across all platforms. Consider consolidating these into a single step that runs for all platforms, removing the platform-specific conditionals and repeated command structures.

Copilot uses AI. Check for mistakes.
Comment on lines +56 to +63
- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}/PeriodicTableMaui/PeriodicTableMaui.csproj

- name: Build Android (MAUI Controls)
run: dotnet build ${{ env.PROJECT_PATH }}/PeriodicTableMaui/PeriodicTableMaui.csproj --configuration Release --framework net9.0-android --no-restore

- name: Build Android (Blazor Hybrid)
run: dotnet build ${{ env.PROJECT_PATH }}/PeriodicTableBlazorMaui/PeriodicTableBlazorMaui.csproj --configuration Release --framework net9.0-android --no-restore
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependencies restoration only targets PeriodicTableMaui.csproj but the subsequent build step also builds PeriodicTableBlazorMaui.csproj. The Blazor project dependencies may not be restored, potentially causing build failures.

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +88
- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}/PeriodicTableMaui/PeriodicTableMaui.csproj

- name: Build Windows (MAUI Controls)
run: dotnet build ${{ env.PROJECT_PATH }}/PeriodicTableMaui/PeriodicTableMaui.csproj --configuration Release --framework net9.0-windows10.0.19041.0 --no-restore

- name: Build Windows (Blazor Hybrid)
run: dotnet build ${{ env.PROJECT_PATH }}/PeriodicTableBlazorMaui/PeriodicTableBlazorMaui.csproj --configuration Release --framework net9.0-windows10.0.19041.0 --no-restore No newline at end of file
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependencies restoration only targets PeriodicTableMaui.csproj but the subsequent build step also builds PeriodicTableBlazorMaui.csproj. The Blazor project dependencies may not be restored, potentially causing build failures.

Copilot uses AI. Check for mistakes.
@chabiss chabiss merged commit 7bc10dd into main Aug 29, 2025
1 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants