From b8c3389d483d9457ff849801f893daccb5cc6cc1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:07:09 +0000 Subject: [PATCH 1/4] Initial plan From 23aa078784a780b55b5cb408e91f1a04db2bbef8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:10:33 +0000 Subject: [PATCH 2/4] Fix array initialization syntax in ExcelConstants.cs Co-authored-by: chsword <274085+chsword@users.noreply.github.com> --- Chsword.Excel2Object/Internal/ExcelConstants.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Chsword.Excel2Object/Internal/ExcelConstants.cs b/Chsword.Excel2Object/Internal/ExcelConstants.cs index 2dc1b10..205898f 100644 --- a/Chsword.Excel2Object/Internal/ExcelConstants.cs +++ b/Chsword.Excel2Object/Internal/ExcelConstants.cs @@ -43,6 +43,7 @@ public static class DateFormats /// This array is intended for use when attempting to parse date/time values from Excel cells that may be formatted in a variety of ways. /// public static readonly string[] CommonDateTimeFormats = + [ // ISO 8601 formats "yyyy-MM-ddTHH:mm:ss", "yyyy-MM-ddTHH:mm:ssZ", @@ -99,6 +100,6 @@ public static class DateFormats "hh:mm tt", "h:mm:ss tt", "h:mm tt" - }; + ]; } } From 2c1c19f56cf673cfda76742851afd68404f6e892 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:11:41 +0000 Subject: [PATCH 3/4] Add comprehensive GitHub Actions CI workflow and update badges Co-authored-by: chsword <274085+chsword@users.noreply.github.com> --- .github/workflows/dotnet-ci.yml | 85 +++++++++++++++++++++++++++++++ .github/workflows/dotnet-core.yml | 25 --------- README.md | 2 +- README_EN.md | 2 +- 4 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/dotnet-ci.yml delete mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-ci.yml b/.github/workflows/dotnet-ci.yml new file mode 100644 index 0000000..2295c1e --- /dev/null +++ b/.github/workflows/dotnet-ci.yml @@ -0,0 +1,85 @@ +name: .NET CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build-and-test: + name: Build and Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + fail-fast: false + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.0.x + 8.0.x + 9.0.x + + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ matrix.os }} + path: "**/test-results.trx" + + package: + name: Create NuGet Package + runs-on: ubuntu-latest + needs: build-and-test + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.0.x + 8.0.x + 9.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Pack + run: dotnet pack --configuration Release --no-build --output ./artifacts + + - name: Upload NuGet package + uses: actions/upload-artifact@v4 + with: + name: nuget-package + path: ./artifacts/*.nupkg diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml deleted file mode 100644 index 347cb80..0000000 --- a/.github/workflows/dotnet-core.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: .NET Core - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.301 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-restore --verbosity normal diff --git a/README.md b/README.md index 0544a99..07db3ff 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![install from nuget](http://img.shields.io/nuget/v/Chsword.Excel2Object.svg?style=flat-square)](https://www.nuget.org/packages/Chsword.Excel2Object) [![release](https://img.shields.io/github/release/chsword/Excel2Object.svg?style=flat-square)](https://github.com/chsword/Excel2Object/releases) -[![Build status](https://ci.appveyor.com/api/projects/status/4po2h27j7yg4bph5/branch/master?svg=true)](https://ci.appveyor.com/project/chsword/excel2object) +[![.NET CI](https://github.com/chsword/Excel2Object/actions/workflows/dotnet-ci.yml/badge.svg)](https://github.com/chsword/Excel2Object/actions/workflows/dotnet-ci.yml) [![CodeFactor](https://www.codefactor.io/repository/github/chsword/excel2object/badge)](https://www.codefactor.io/repository/github/chsword/excel2object) Excel 与 .NET 对象互相转换 / Excel convert to .NET Object and vice versa. diff --git a/README_EN.md b/README_EN.md index 1b4c559..9c433c7 100644 --- a/README_EN.md +++ b/README_EN.md @@ -2,7 +2,7 @@ [![install from nuget](http://img.shields.io/nuget/v/Chsword.Excel2Object.svg?style=flat-square)](https://www.nuget.org/packages/Chsword.Excel2Object) [![release](https://img.shields.io/github/release/chsword/Excel2Object.svg?style=flat-square)](https://github.com/chsword/Excel2Object/releases) -[![Build status](https://ci.appveyor.com/api/projects/status/4po2h27j7yg4bph5/branch/master?svg=true)](https://ci.appveyor.com/project/chsword/excel2object) +[![.NET CI](https://github.com/chsword/Excel2Object/actions/workflows/dotnet-ci.yml/badge.svg)](https://github.com/chsword/Excel2Object/actions/workflows/dotnet-ci.yml) [![CodeFactor](https://www.codefactor.io/repository/github/chsword/excel2object/badge)](https://www.codefactor.io/repository/github/chsword/excel2object) Excel convert to .NET Object / .NET Object convert to Excel. From 47b140f8cd1ebde919c4c83949e9247d79f9ef05 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Oct 2025 09:13:25 +0000 Subject: [PATCH 4/4] Remove AppVeyor configuration and replace with GitHub Actions CI Co-authored-by: chsword <274085+chsword@users.noreply.github.com> --- Chsword.Excel2Object.sln | 1 - appveyor.yml | 16 ---------------- 2 files changed, 17 deletions(-) delete mode 100644 appveyor.yml diff --git a/Chsword.Excel2Object.sln b/Chsword.Excel2Object.sln index 0c3243b..1d71c4b 100644 --- a/Chsword.Excel2Object.sln +++ b/Chsword.Excel2Object.sln @@ -7,7 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .gitattributes = .gitattributes .gitignore = .gitignore - appveyor.yml = appveyor.yml ExcelFunctions.md = ExcelFunctions.md README.md = README.md EndProjectSection diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 2899cad..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: 2.0.0.{build} -branches: - only: - - main -image: Visual Studio 2022 -configuration: Release -dotnet_csproj: - patch: true - file: '**\*.csproj' - version: '{version}' - package_version: '{version}' -before_build: -- cmd: dotnet restore ./Chsword.Excel2Object.sln -build: - publish_nuget: true - verbosity: minimal \ No newline at end of file