-
Notifications
You must be signed in to change notification settings - Fork 1
Update workflow for .NET 10 build and custom deployment #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Refactored the GitHub Actions workflow to use .NET 10.0, added explicit restore/build/publish steps, and updated environment variables for optimized .NET builds. Changed deployment to use published output, skip internal builds, and set production branch to 'main'. Updated checkout and deployment actions, and cleaned up unused config and comments.
Changed the job name and PROJECT path in the GitHub Actions workflow to reference Bezalu.ProjectReporting.Web instead of MyAzureSWAProject, ensuring the correct project is built and deployed.
Added a "Workload Restore" step in the CI workflow to run `dotnet workload restore` after restoring project dependencies. This ensures all required .NET SDK workloads are available before build and publish steps.
Renamed the "Restore" step to "Package Restore" and changed the command from restoring a specific project to restoring all packages in the solution. This ensures dependencies for all projects are restored.
Swapped the order of "Package Restore" and "Workload Restore" steps in the Azure pipeline YAML. "Workload Restore" now runs before "Package Restore" to improve build step sequencing. No other changes were made.
Removed separate restore and build steps from the workflow. The publish step now performs the build directly by omitting the "--no-build" flag, streamlining the deployment process, and skipping some weird state problems.
MWG-Logan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readme changes pretty tame- mostly indicating project use-case and fixing formatting.
YML changes are a bit more problematic but these files in specific are in place and working on a fork.
There was a problem hiding this 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 updates the CI/CD workflows to target .NET 10, adds explicit build/publish steps for better control, and introduces a separate Azure Functions deployment workflow. The changes also update the production branch from 'dev' to 'main' and modernize GitHub Action versions.
Key Changes:
- Updated Static Web Apps workflow to use explicit .NET build/publish steps instead of relying on the deploy action's built-in build
- Added new Azure Functions deployment workflow with OIDC authentication
- Changed target branch from 'dev' to 'main' for both workflows
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/swa-deploy.yml | Refactored to use .NET 10, added explicit restore/build/publish steps, updated to deploy pre-built artifacts, changed branch to 'main', and updated action versions |
| .github/workflows/func-deploy.yml | New workflow for deploying Azure Functions API separately using OIDC authentication with build/deploy job separation |
| Bezalu.ProjectReporting.API/README.md | Improved formatting with consistent spacing, proper markdown code block syntax highlighting (json/bash), and better section separation |
Critical Issues Identified:
The workflow contains several critical issues that will prevent it from running successfully:
-
Nonexistent Action Versions: The workflows reference action versions that don't exist (checkout@v6, setup-dotnet@v4/v5). These should be downgraded to stable versions like checkout@v4 and setup-dotnet@v3.
-
Nonexistent .NET Version: .NET 10.0 does not exist as of December 2025. The latest stable version is .NET 9. The workflow will fail when trying to install this version.
-
Breaking Secret Name Change: The secret reference was changed from a specific token name to a generic one, which will cause failures if not updated in repository settings.
-
Missing API Deployment: The API location configuration was removed from the Static Web Apps deployment, which may result in the API not being deployed unless the separate func-deploy.yml workflow handles this completely.
Comments suppressed due to low confidence (7)
.github/workflows/swa-deploy.yml:70
- There are excessive blank lines at the end of the file. These should be removed to maintain clean formatting and avoid unnecessary whitespace.
.github/workflows/swa-deploy.yml:49 - The API deployment configuration has been removed. The original workflow included 'api_location: "Bezalu.ProjectReporting.API"' to deploy the Azure Functions API. While 'skip_api_build: true' is set, removing the api_location entirely means the API won't be deployed at all. If the API is being deployed separately via the func-deploy.yml workflow, this is acceptable, but if not, the API deployment will be missing.
.github/workflows/swa-deploy.yml:44 - The secret reference has been changed from 'AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_COAST_0420E6310' to 'AZURE_STATIC_WEB_APPS_API_TOKEN'. This change will cause the workflow to fail if the new secret name is not configured in the repository settings. Ensure the secret is created with the new name before merging this change.
.github/workflows/swa-deploy.yml:24 - The action version 'actions/setup-dotnet@v4' does not exist. The latest stable version is 'actions/setup-dotnet@v3'. Using a nonexistent version will cause the workflow to fail.
.github/workflows/swa-deploy.yml:60 - The secret reference has been changed from 'AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_COAST_0420E6310' to 'AZURE_STATIC_WEB_APPS_API_TOKEN'. This change will cause the workflow to fail if the new secret name is not configured in the repository settings. Ensure the secret is created with the new name before merging this change.
.github/workflows/swa-deploy.yml:18 - The action version 'actions/checkout@v6' does not exist. As of December 2025, the latest stable version is 'actions/checkout@v4'. Using a nonexistent version will cause the workflow to fail.
.github/workflows/swa-deploy.yml:26 - .NET version '10.0.x' does not exist. As of December 2025, the latest stable version is .NET 9. Using a nonexistent version will cause the setup step to fail. Update to a valid .NET version such as '9.0.x' or ensure the version specified matches the actual target framework used in the project files.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Refactored the GitHub Actions workflow to use .NET 10.0, added explicit restore/build/publish steps, and updated environment variables for optimized .NET builds. Changed deployment to use published output, skip internal builds, and set production branch to 'main'. Updated checkout and deployment actions, and cleaned up unused config and comments.