diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index d044c41..1b44a75 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -28,9 +28,26 @@ jobs: working-directory: ./PreMailer.Net run: dotnet test --no-restore --verbosity normal --collect "Code coverage" + - name: Extract version from tag + if: ${{ github.event_name == 'release' }} + id: version + run: | + TAG_NAME="${{ github.event.release.tag_name }}" + VERSION=${TAG_NAME#v} + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Write release notes to file + if: ${{ github.event_name == 'release' }} + run: echo "${{ github.event.release.body }}" > release-notes.txt + - name: Package if: ${{ github.event_name == 'release' }} - run: dotnet pack -c Release -o . PreMailer.Net/PreMailer.Net/PreMailer.Net.csproj + run: | + RELEASE_NOTES=$(cat release-notes.txt) + dotnet pack -c Release -o . PreMailer.Net/PreMailer.Net/PreMailer.Net.csproj \ + -p:Version="${{ steps.version.outputs.version }}" \ + -p:PackageReleaseNotes="$RELEASE_NOTES" + - name: Publish if: ${{ github.event_name == 'release' }} run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_APIKEY }} -s https://api.nuget.org/v3/index.json diff --git a/PreMailer.Net/PreMailer.Net/PreMailer.Net.csproj b/PreMailer.Net/PreMailer.Net/PreMailer.Net.csproj index 912e6c7..b5f505e 100644 --- a/PreMailer.Net/PreMailer.Net/PreMailer.Net.csproj +++ b/PreMailer.Net/PreMailer.Net/PreMailer.Net.csproj @@ -3,7 +3,6 @@ netstandard2.0;net461 latest - 2.7.0 Martin H. Normark PreMailer.Net is a C# utility for moving CSS to inline style attributes, to gain maximum E-mail client compatibility. @@ -14,30 +13,6 @@ icon.png false README.md - - What's Changed - - * Build(deps): Bump actions/checkout from 4.1.6 to 4.1.7 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/409 - * Build(deps): Bump actions/setup-dotnet from 4.0.0 to 4.0.1 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/411 - * Build(deps): Bump pascalgn/automerge-action from 0.16.3 to 0.16.4 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/412 - * Build(deps): Bump actions/checkout from 4.1.7 to 4.2.0 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/413 - * Build(deps): Bump actions/checkout from 4.2.0 to 4.2.1 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/414 - * Build(deps): Bump actions/checkout from 4.2.1 to 4.2.2 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/415 - * Build(deps): Bump actions/setup-dotnet from 4.0.1 to 4.1.0 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/416 - * Build(deps): Bump actions/setup-dotnet from 4.1.0 to 4.2.0 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/418 - * Update target frameworks of test and benchmark projects by @martinnormark in https://github.com/milkshakesoftware/PreMailer.Net/pull/420 - * LinkTagCssSource now also downloads content from @import declarations. by @whorchner in https://github.com/milkshakesoftware/PreMailer.Net/pull/419 - * Build(deps): Bump actions/setup-dotnet from 4.2.0 to 4.3.0 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/421 - * Build(deps): Bump actions/setup-dotnet from 4.3.0 to 4.3.1 by @dependabot in https://github.com/milkshakesoftware/PreMailer.Net/pull/423 - * Fix #410: Preserve !important tag in inlined styles by @devin-ai-integration in https://github.com/milkshakesoftware/PreMailer.Net/pull/424 - * Fix #347: Preserve HTML entities like © during processing by @devin-ai-integration in https://github.com/milkshakesoftware/PreMailer.Net/pull/425 - * Update README to accurately document PreMailer API by @devin-ai-integration in https://github.com/milkshakesoftware/PreMailer.Net/pull/426 - * Fix #171: Preserve empty HTML tags during serialization by @devin-ai-integration in https://github.com/milkshakesoftware/PreMailer.Net/pull/427 - * Fix CSS comment regex to handle protocol-agnostic URLs in premailer attributes by @devin-ai-integration in https://github.com/milkshakesoftware/PreMailer.Net/pull/428 - * Fix issue #235: Preserve base64 encoded images and URLs during CSS parsing and style application by @devin-ai-integration in https://github.com/milkshakesoftware/PreMailer.Net/pull/429 - - Full Changelog: https://github.com/milkshakesoftware/PreMailer.Net/compare/v2.6.0...v2.7.0 - email css newsletter html true PreMailer.Net.snk