From c283d15d7c04e1d1755b4db23ef78d84814894a5 Mon Sep 17 00:00:00 2001 From: Hootan Hemmati Date: Thu, 12 Sep 2024 10:13:19 +0330 Subject: [PATCH 1/3] Update version to 1.0.5 and related docs Update the version to 1.0.5 and update related documentation. * **PrsianDate/PersianDate.csproj** - Update the `` element to `1.0.5`. - Update the `` element to mention support for .NET 8.0. * **README.md** - Update the version mentioned in the "Persian Date Public Version" table to `1.0.5`. - Add a note in the "Version changes" section mentioning the addition of support for .NET 8.0. - Reorder the "Version changes" section to place version 1.0.5 at the top. --- PrsianDate/PersianDate.csproj | 4 ++-- README.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PrsianDate/PersianDate.csproj b/PrsianDate/PersianDate.csproj index 4674add..0f5fe90 100644 --- a/PrsianDate/PersianDate.csproj +++ b/PrsianDate/PersianDate.csproj @@ -12,10 +12,10 @@ MIT PersianDateShamsi persian,persian calender,persian date,shamsi,jalali - Change .Net Standard 2.0 to .NET 7.0 + Add support for .Net 8.0 en-US https://github.com/hootanht/PrsianDate - 1.0.4 + 1.0.5 https://github.com/hootanht/PrsianDate git disable diff --git a/README.md b/README.md index 842e391..f7249d4 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ Persian Data Library is a library that can be convert **Gregorian** (Milady) yea ## Persian Date Public Version | Target | Branch | Version | Download link | Total downloads | | ------ | ------ | ------ | ------ | ------ | -| Nuget | master | v1.0.4 | [![NuGet](https://img.shields.io/nuget/v/PersianDateShamsi.svg)](https://www.nuget.org/packages/PersianDateShamsi) | [![NuGet downloads](https://img.shields.io/nuget/dt/PersianDateShamsi.svg)](https://www.nuget.org/packages/PersianDateShamsi) | -| Release | master | v1.0.4 | [![Build Status](https://dev.azure.com/hootanht/PersianDate/_apis/build/status/PersianDate?branchName=master)](https://hootanht.visualstudio.com/PersianDate) | | +| Nuget | master | v1.0.5 | [![NuGet](https://img.shields.io/nuget/v/PersianDateShamsi.svg)](https://www.nuget.org/packages/PersianDateShamsi) | [![NuGet downloads](https://img.shields.io/nuget/dt/PersianDateShamsi.svg)](https://www.nuget.org/packages/PersianDateShamsi) | +| Release | master | v1.0.5 | [![Build Status](https://dev.azure.com/hootanht/PersianDate/_apis/build/status/PersianDate?branchName=master)](https://hootanht.visualstudio.com/PersianDate) | | ## Cross Platform @@ -60,6 +60,10 @@ Extension Method For DateTime ``` ## Version changes +Version 1.0.5 + +-Add support for .Net 8.0 + Version 1.0.4 -Add support for .Net 5.0 and 6.0 @@ -76,10 +80,6 @@ Version 1.0.1 -Change .Net Standard 2.1 To 2.0 To Support More Platforms -Version 1.0.5 - --Add support for .Net 8.0 - ## CI Pipeline The CI pipeline is defined in `azure-pipelines.yml` and uses `windows-latest` as the VM image. It restores NuGet packages, builds the solution, and runs tests. From 7f8613d9292a90b0430c0873304877adf86a33f2 Mon Sep 17 00:00:00 2001 From: Hootan Hemmati Date: Thu, 12 Sep 2024 10:16:57 +0330 Subject: [PATCH 2/3] Add GitHub Actions CI/CD pipeline and update project configuration * **PrsianDate/PersianDate.csproj** - Add `https://api.nuget.org/v3/index.json` to the `` section - Add `nuget` to the `` section * **README.md** - Update the CI pipeline section to mention the new GitHub Actions CI/CD pipeline - Remove the mention of `azure-pipelines.yml` * **.github/workflows/ci-cd.yml** - Create a new GitHub Actions workflow file - Add a trigger for push and pull request events to the `master` branch - Add steps to restore NuGet packages, build the solution, run tests, and publish the NuGet package * **azure-pipelines.yml** - Delete the file --- .github/workflows/ci-cd.yml | 34 ++++++++++++++++++++++ PrsianDate/PersianDate.csproj | 2 ++ README.md | 4 +-- azure-pipelines.yml | 54 ----------------------------------- 4 files changed, 38 insertions(+), 56 deletions(-) create mode 100644 .github/workflows/ci-cd.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..78a6a01 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,34 @@ +name: CI/CD + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + + - name: Restore dependencies + run: dotnet restore + + - name: Build solution + run: dotnet build --configuration Release --no-restore + + - name: Run tests + run: dotnet test --no-restore --verbosity normal + + - name: Publish NuGet package + run: dotnet pack --configuration Release --no-restore diff --git a/PrsianDate/PersianDate.csproj b/PrsianDate/PersianDate.csproj index 0f5fe90..36b29d6 100644 --- a/PrsianDate/PersianDate.csproj +++ b/PrsianDate/PersianDate.csproj @@ -20,6 +20,8 @@ git disable enable + https://api.nuget.org/v3/index.json + nuget diff --git a/README.md b/README.md index f7249d4..3663879 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Persian Data Library is a library that can be convert **Gregorian** (Milady) yea | Target | Branch | Version | Download link | Total downloads | | ------ | ------ | ------ | ------ | ------ | | Nuget | master | v1.0.5 | [![NuGet](https://img.shields.io/nuget/v/PersianDateShamsi.svg)](https://www.nuget.org/packages/PersianDateShamsi) | [![NuGet downloads](https://img.shields.io/nuget/dt/PersianDateShamsi.svg)](https://www.nuget.org/packages/PersianDateShamsi) | -| Release | master | v1.0.5 | [![Build Status](https://dev.azure.com/hootanht/PersianDate/_apis/build/status/PersianDate?branchName=master)](https://hootanht.visualstudio.com/PersianDate) | | +| Release | master | v1.0.5 | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) | | ## Cross Platform @@ -82,7 +82,7 @@ Version 1.0.1 ## CI Pipeline -The CI pipeline is defined in `azure-pipelines.yml` and uses `windows-latest` as the VM image. It restores NuGet packages, builds the solution, and runs tests. +The CI pipeline is defined in `.github/workflows/ci-cd.yml` and uses `windows-latest` as the VM image. It restores NuGet packages, builds the solution, runs tests, and publishes the NuGet package. ## Developer [![Twitter Follow](https://img.shields.io/twitter/follow/hootanht?style=social)](https://twitter.com/hootanht) | Name | Github | Email | Telegram | diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 71c9f53..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,54 +0,0 @@ -# ASP.NET Core (.NET Framework) -# Build and test ASP.NET Core projects targeting the full .NET Framework. -# Add steps that publish symbols, save build artifacts, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core - -trigger: -- master - -pool: - vmImage: 'windows-latest' - -variables: - solution: '**/*.sln' - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' - targetFramework: 'net8.0' - -steps: -- task: NuGetToolInstaller@1 - -- task: NuGetCommand@2 - inputs: - restoreSolution: '$(solution)' - -- task: VSBuild@1 - inputs: - solution: '$(solution)' - msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site" /p:TargetFramework=$(targetFramework)' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - -- task: VSTest@2 - inputs: - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - testAssemblyVer2: | - **\$(buildConfiguration)\**\*test*.dll - **\$(buildConfiguration)\**\*Test*.dll - !**\obj\** - searchFolder: '$(System.DefaultWorkingDirectory)' - runSettingsFile: '' - codeCoverageEnabled: false - -- task: PublishTestResults@2 - inputs: - testResultsFiles: '**/TestResults/*.trx' - mergeTestResults: true - testRunTitle: 'Test Results' - -- task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'drop' - publishLocation: 'Container' From e454c75faab4ee2cc3b6c509a0d8d3db905ce7dc Mon Sep 17 00:00:00 2001 From: Hootan Hemmati Date: Thu, 12 Sep 2024 10:23:46 +0330 Subject: [PATCH 3/3] Update .NET versions in CI pipeline and README * **CI Pipeline** - Update `dotnet-version` in `.github/workflows/ci-cd.yml` to include '5.0.x', '6.0.x', '7.0.x', and '8.0.x' * **README.md** - Update supported .NET versions in the "Cross Platform" section to include 5.0, 6.0, 7.0, and 8.0 - Update CI pipeline description to mention the installation of multiple .NET versions --- .github/workflows/ci-cd.yml | 12 ++++++++++++ README.md | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 78a6a01..1f040e4 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -16,6 +16,18 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.x' + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '7.0.x' - name: Setup .NET uses: actions/setup-dotnet@v1 with: diff --git a/README.md b/README.md index 3663879..c7e14ed 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ Persian Data Library is a library that can be convert **Gregorian** (Milady) yea | Platform | Supported Version | | ------ | ------ | -| .NET | 5.0 Or Higher| +| .NET | 5.0 | +| .NET | 6.0 | +| .NET | 7.0 | | .NET | 8.0 | ## Code Example @@ -82,7 +84,7 @@ Version 1.0.1 ## CI Pipeline -The CI pipeline is defined in `.github/workflows/ci-cd.yml` and uses `windows-latest` as the VM image. It restores NuGet packages, builds the solution, runs tests, and publishes the NuGet package. +The CI pipeline is defined in `.github/workflows/ci-cd.yml` and uses `windows-latest` as the VM image. It restores NuGet packages, builds the solution, runs tests, and publishes the NuGet package. The pipeline installs .NET versions 5.0.x, 6.0.x, 7.0.x, and 8.0.x to ensure compatibility with all targeted frameworks. ## Developer [![Twitter Follow](https://img.shields.io/twitter/follow/hootanht?style=social)](https://twitter.com/hootanht) | Name | Github | Email | Telegram |