Skip to content

Commit

Permalink
Merge pull request #21 from hootanht/update-version-and-add-release
Browse files Browse the repository at this point in the history
Update version to 1.0.6 and add GitHub release
  • Loading branch information
hootanht authored Sep 12, 2024
2 parents 17d650d + 3fbddfb commit 844248b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,44 @@ jobs:
run: |
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
create_github_release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: macos-latest
needs: [ deploy ]
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4

- name: Get version from csproj
id: get_version
run: |
$version = (Get-Content -Path PersianDate/PersianDate.csproj) -match '<Version>(.*)</Version>' | Out-Null; $matches[1]
echo "::set-output name=VERSION::$version"
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
## What's Changed
${{ github.event.head_commit.message }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.NuGetDirectory }}/*.nupkg
asset_name: PersianDateShamsi.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion PersianDate/PersianDate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReleaseNotes>Add support for .Net 8.0</PackageReleaseNotes>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageProjectUrl>https://github.com/hootanht/PrsianDate</PackageProjectUrl>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<RepositoryUrl>https://github.com/hootanht/PersianDate</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<ImplicitUsings>disable</ImplicitUsings>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Persian Data Library is a library that can be convert **Gregorian** (Milady) yea
## Persian Date Public Version
| Target | Branch | Version | Download link | Total downloads | CI Build Status | CD Build Status |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| 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) | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CI.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CD.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) |
| Nuget | master | v1.0.6 | [![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) | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CI.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CD.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) |
| Release | master | v1.0.5 | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CI.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) | | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CI.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) | [![Build Status](https://github.com/hootanht/PersianDate/actions/workflows/CD.yml/badge.svg)](https://github.com/hootanht/PersianDate/actions) |

## Cross Platform
Expand Down Expand Up @@ -59,7 +59,7 @@ Extension Method For DateTime
```

## Version changes
Version 1.0.5
Version 1.0.6

-Add support for .Net 8.0

Expand Down

0 comments on commit 844248b

Please sign in to comment.