Add GitHub Actions CI workflow to replace AppVeyor - #43
Conversation
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the CI/CD pipeline by replacing the existing AppVeyor configuration with a comprehensive GitHub Actions workflow that provides multi-platform testing and automated NuGet package building.
- Replaces AppVeyor CI with GitHub Actions for better platform coverage and native GitHub integration
- Implements multi-platform testing across Ubuntu, Windows, and macOS with .NET 6.0, 8.0, and 9.0 support
- Fixes a syntax error in the ExcelConstants.cs file for modern C# collection expressions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| appveyor.yml | Removes legacy AppVeyor CI configuration |
| .github/workflows/dotnet-core.yml | Removes outdated .NET Core workflow |
| .github/workflows/dotnet-ci.yml | Adds comprehensive CI workflow with multi-platform testing and NuGet packaging |
| README.md, README_EN.md | Updates build status badges to point to new GitHub Actions workflow |
| Chsword.Excel2Object.sln | Removes AppVeyor configuration reference from solution |
| Chsword.Excel2Object/Internal/ExcelConstants.cs | Fixes collection expression syntax for C# 12 compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| name: Create NuGet Package | ||
| runs-on: ubuntu-latest | ||
| needs: build-and-test | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
There was a problem hiding this comment.
The condition only checks for 'main' branch but the workflow triggers on both 'main' and 'master' branches (line 5). Consider updating to check for both branches: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') |
Overview
This PR replaces the existing AppVeyor CI configuration with a modern GitHub Actions workflow, providing comprehensive multi-platform testing and automated package building.
What Changed
1. New GitHub Actions Workflow
Created
.github/workflows/dotnet-ci.ymlwith the following features:The workflow consists of two jobs:
2. Removed AppVeyor Configuration
appveyor.yml3. Updated Documentation
README.mdandREADME_EN.mdto point to the new GitHub Actions workflow4. Fixed Build Issue
Fixed a syntax error in
Chsword.Excel2Object/Internal/ExcelConstants.cswhere theCommonDateTimeFormatsarray was missing its opening bracket for the collection expression.Why This Change?
The new GitHub Actions CI provides several advantages over AppVeyor:
Testing
✅ All 88 tests pass on the local environment
✅ Builds successfully for all 6 target frameworks
✅ Workflow YAML syntax validated with yamllint
✅ Clean build from scratch verified
The workflow will be automatically triggered on the next push/PR to validate multi-platform compatibility.
Related Issues
Fixes issue: 添加 github ci 方案 取代现有ci 并保证项目编译测试通过 (Add GitHub CI solution to replace existing CI and ensure project builds and tests pass)
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.