From 545fe9988e09da5c588b5b0877cf4897732a9d1f Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:59:39 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Updates=20Publish=20Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 54 +++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a96d488..b460be0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,21 +11,21 @@ jobs: begin-release: name: Begin Release runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: github.event.workflow_run.conclusion == 'success' steps: - run: echo "Beginning release." - - name: "Transfer 'version.json' artifact from triggering workflow" - uses: pwshrc/actions-transfer-artifact@v0.3.0 + - name: "Transfer 'version-json' artifact from triggering workflow" + uses: pwshrc/actions-transfer-artifact@v0.3.2 with: - name: 'version.json' + name: 'version-json' - name: "Transfer 'PSGallery-package' artifact from triggering workflow" - uses: pwshrc/actions-transfer-artifact@v0.3.0 + uses: pwshrc/actions-transfer-artifact@v0.3.2 with: name: 'PSGallery-package' - - name: "Transfer 'release-notes.md' artifact from triggering workflow" - uses: pwshrc/actions-transfer-artifact@v0.3.0 + - name: "Transfer 'release-notes' artifact from triggering workflow" + uses: pwshrc/actions-transfer-artifact@v0.3.2 with: - name: 'release-notes.md' + name: 'release-notes' test-publish-psgallery-package: name: Test Publish to PSGallery @@ -34,19 +34,24 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 + - name: Populate GitVersion variables + id: gitversion_vars + uses: pwshrc/actions-determine-version@v0.8.0 + with: + mode: 'download' - name: "Get artifact: PSGallery-package" uses: actions/download-artifact@v3 with: name: PSGallery-package path: ./out/ - name: Publish Prerelease to PSGallery (WhatIf) - if: "${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}" - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.0 + if: steps.gitversion_vars.outputs.PreReleaseTag != '' + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.2 with: run: ./build/publish.ps1 -NUGET_KEY "abc" -Prerelease -WhatIf - name: Publish Release to PSGallery (WhatIf) - if: "${{ steps.gitversion_vars.outputs.PreReleaseTag == '' }}" - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.0 + if: steps.gitversion_vars.outputs.PreReleaseTag == '' + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.2 with: run: ./build/publish.ps1 -NUGET_KEY "abc" -WhatIf @@ -59,7 +64,7 @@ jobs: uses: actions/checkout@v3 - name: Populate GitVersion variables id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.3.0 + uses: pwshrc/actions-determine-version@v0.8.0 with: mode: 'download' - name: "Get artifact: PSGallery-package" @@ -68,15 +73,15 @@ jobs: name: PSGallery-package path: ./out/ - name: Publish Prerelease to PSGallery - if: "${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}" - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.0 + if: steps.gitversion_vars.outputs.PreReleaseTag != '' + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.2 env: NUGET_KEY: ${{ secrets.NUGET_KEY }} with: run: ./build/publish.ps1 -NUGET_KEY "$env:NUGET_KEY" -Prerelease - name: Publish Release to PSGallery - if: "${{ steps.gitversion_vars.outputs.PreReleaseTag == '' }}" - uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.0 + if: steps.gitversion_vars.outputs.PreReleaseTag == '' + uses: pwshrc/actions-invoke-lib-dependent-pwsh@v0.2.2 env: NUGET_KEY: ${{ secrets.NUGET_KEY }} with: @@ -89,16 +94,17 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 - - name: Populate GitVersion variables + - name: Get GitVersion id: gitversion_vars - uses: pwshrc/actions-determine-version@v0.3.0 + uses: pwshrc/actions-determine-version@v0.8.0 with: mode: 'download' - - name: "Get artifact: release-notes.md" - uses: actions/download-artifact@v3 + - name: Get release notes + id: get-releasenotes + uses: pwshrc/actions-create-release-notes@v0.8.0 with: - name: release-notes.md - path: ./out/ + mode: 'download' + github_token: "${{ secrets.GITHUB_TOKEN }}" - name: "Get artifact: PSGallery-package" uses: actions/download-artifact@v3 with: @@ -113,7 +119,7 @@ jobs: tag_name: "v${{ steps.gitversion_vars.outputs.SemVer }}" target_commitish: "${{ steps.gitversion_vars.outputs.Sha }}" generate_release_notes: false - body_path: ./out/release-notes.md + body_path: ${{ steps.get-releasenotes.outputs.filepath }} prerelease: "${{ steps.gitversion_vars.outputs.PreReleaseTag != '' }}" draft: false files: |