From 113393a47fb3c54e61fddeda9999bd9ad12dad87 Mon Sep 17 00:00:00 2001 From: merill Date: Fri, 29 Mar 2024 21:21:00 +1100 Subject: [PATCH] Update publish-module.yaml --- .github/workflows/publish-module.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-module.yaml b/.github/workflows/publish-module.yaml index e121d002..cb62b1a5 100644 --- a/.github/workflows/publish-module.yaml +++ b/.github/workflows/publish-module.yaml @@ -1,20 +1,20 @@ -name: publish-module +name: Create PowerShell module release artifacts and publish them to GitHub and PowerShell Gallery on: workflow_dispatch: -permissions: - contents: read - checks: write - id-token: write - jobs: build-validation: uses: ./.github/workflows/build-validation.yaml create-release: needs: build-validation - runs-on: ubuntu-latest + runs-on: windows-latest + permissions: + id-token: write + contents: write + checks: write + steps: - uses: actions/checkout@v3 @@ -24,12 +24,12 @@ jobs: shell: pwsh run: | $ModuleRoot = "$($env:GITHUB_WORKSPACE)/powershell" - $ManifestPath = "$($ModuleRoot)/Maester.psd1" - if ( -not (Test-Path $ManifestPath )) { - Write-Error "Could not find PowerShell module manifest ($ManifestPath)" + $ManfifestPath = "$($ModuleRoot)/maester.psd1" + if ( -not (Test-Path $ManfifestPath )) { + Write-Error "Could not find PowerShell module manifest ($ManfifestPath)" throw } else { - $CurrentVersion = Import-PowerShellDataFile $ManifestPath | Select-Object -ExpandProperty ModuleVersion + $CurrentVersion = Import-PowerShellDataFile $ManfifestPath | Select-Object -ExpandProperty ModuleVersion Add-Content -Path $env:GITHUB_OUTPUT -Value "tag=$CurrentVersion" } @@ -84,4 +84,4 @@ jobs: makeLatest: legacy prerelease: false tag: ${{ steps.moduleversion.outputs.tag }} - commit: ${{ github.sha }} + commit: ${{ github.sha }} \ No newline at end of file