Bumped version and updated release notes (#80) #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish NuGet | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| publish-nuget: | |
| name: publish-nuget | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: "Update release notes" | |
| shell: pwsh | |
| run: | | |
| ./build.ps1 | |
| - name: Create Packages | |
| run: dotnet pack /p:PackageVersion=${{ github.ref_name }} -c Release -o ./output | |
| - name: Push Packages | |
| run: dotnet nuget push "output/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json | |
| - name: "Extract latest release notes" | |
| shell: pwsh | |
| run: | | |
| $content = Get-Content RELEASE_NOTES.md -Raw | |
| # Match from the first #### heading to just before the second one | |
| if ($content -match '(?s)(####.+?)(?=\n####|\z)') { | |
| $Matches[1].Trim() | Set-Content RELEASE_NOTES_LATEST.md | |
| } else { | |
| $content | Set-Content RELEASE_NOTES_LATEST.md | |
| } | |
| - name: release | |
| uses: actions/create-release@v1 | |
| id: create_release | |
| with: | |
| draft: false | |
| prerelease: false | |
| release_name: 'Akka.Persistence.EventStore ${{ github.ref_name }}' | |
| tag_name: ${{ github.ref }} | |
| body_path: RELEASE_NOTES_LATEST.md | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload Release Asset | |
| uses: AButler/upload-release-assets@v3.0 | |
| with: | |
| repo-token: ${{ github.token }} | |
| release-tag: ${{ github.ref_name }} | |
| files: 'output/*.nupkg' |