Skip to content

Commit

Permalink
Build before module load
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Nov 16, 2023
1 parent 8744234 commit bdea5d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
& .\PwshSpectreConsole\Build.ps1
$env:PSModulePath = @($env:PSModulePath, ".\PwshSpectreConsole\") -join ":"
$version = Get-Module PwshSpectreConsole -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version
if($null -eq $version) { throw "Failed to load version" }
Expand All @@ -37,7 +38,6 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
& ./PwshSpectreConsole/Build.ps1
Publish-Module -Path "./PwshSpectreConsole/" -Exclude "Build.ps1" -NugetApiKey $env:PSGALLERY_API_KEY
publish-prerelease-to-psgallery:
Expand All @@ -51,6 +51,7 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
& ./PwshSpectreConsole/Build.ps1
$env:PSModulePath = @($env:PSModulePath, ".\PwshSpectreConsole\") -join ":"
$version = Get-Module PwshSpectreConsole -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version
if($null -eq $version) { throw "Failed to load version" }
Expand All @@ -64,5 +65,4 @@ jobs:
git push
# Publish pre-release version
& ./PwshSpectreConsole/Build.ps1
Publish-Module -Path "./PwshSpectreConsole/" -Exclude "Build.ps1" -NugetApiKey $env:PSGALLERY_API_KEY -RequiredVersion "$newVersion-prerelease" -AllowPrerelease

0 comments on commit bdea5d3

Please sign in to comment.