From 1607c9d79fed5532dac79051cd525fb1cfa872f8 Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Sun, 31 Jan 2021 15:27:15 +0000 Subject: [PATCH] Moved publish to after the code that runs the tool --- .github/workflows/build-and-publish-pre-release.yml | 7 ++++--- .github/workflows/build-and-publish-release.yml | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-publish-pre-release.yml b/.github/workflows/build-and-publish-pre-release.yml index dae003da..af60eaca 100644 --- a/.github/workflows/build-and-publish-pre-release.yml +++ b/.github/workflows/build-and-publish-pre-release.yml @@ -58,11 +58,12 @@ jobs: dotnet pack --configuration Release /p:Version=${{ env.BUILD_VERSION }} --no-restore --output ../dist env: ReleaseNotes: ${{ steps.release-notes.outputs.content }} - - name: Publish - run: | - dotnet pushpackages -folder dist --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ secrets.NUGET_FEED }} - name: Update Release Notes run: | + dotnet tool uninstall --local Credfeto.ChangeLog.Cmd dotnet tool install --local Credfeto.ChangeLog.Cmd --version ${{ env.BUILD_VERSION }} --add-source dist dotnet changelog --changelog CHANGELOG.md --extract RELEASE_NOTES.md --version ${{ env.BUILD_VERSION }} dotnet changelog --changelog CHANGELOG.md --check-insert origin/master + - name: Publish + run: | + dotnet pushpackages -folder dist --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ secrets.NUGET_FEED }} diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index adcdae41..e61a7e11 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -55,15 +55,16 @@ jobs: run: | cd src dotnet pack --configuration Release /p:Version=${{ env.BUILD_VERSION }} --no-restore --output ../dist + - name: Update Release Notes with new tool + run: | + dotnet tool uninstall --local Credfeto.ChangeLog.Cmd + dotnet tool install --local Credfeto.ChangeLog.Cmd --version ${{ env.BUILD_VERSION }} --add-source dist + dotnet changelog --changelog CHANGELOG.md --extract RELEASE_NOTES.md --version ${{ env.BUILD_VERSION }} - name: Publish run: | dotnet pushpackages -folder dist --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ secrets.NUGET_FEED }} env: ReleaseNotes: ${{ steps.release-notes.outputs.content }} - - name: Update Release Notes with new tool - run: | - dotnet tool install --local Credfeto.ChangeLog.Cmd --version ${{ env.BUILD_VERSION }} --add-source dist - dotnet changelog --changelog CHANGELOG.md --extract RELEASE_NOTES.md --version ${{ env.BUILD_VERSION }} - name: Create Release id: create_release uses: actions/create-release@v1