Skip to content

Commit

Permalink
Enhancement (ci): Bump PSModulePublisher to v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Jun 16, 2024
1 parent cf78f57 commit 8c64f79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,9 @@ jobs:
NUGET_API_KEY: 'xxx'
run: |
$ErrorActionPreference = 'Stop'
# Generate the new module manifest
$moduleManifest = ./build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Build.ps1
# Publish the module
./build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Publish.ps1 -ModuleManifestPath $moduleManifest -Repository PSGallery -DryRun
Import-Module ./build/PSModulePublisher/src/PSModulePublisher -Force
$moduleManifest = Invoke-Build
Invoke-Publish -ModuleManifestPath $moduleManifest -Repository PSGallery -DryRun
publish-to-psgallery:
needs:
Expand Down Expand Up @@ -203,15 +200,9 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
$ErrorActionPreference = 'Stop'
# Strip of 'v' prefix from tag
$env:MODULE_VERSION = $env:GITHUB_REF_NAME -replace '^v', ''
# Generate the new module manifest
$moduleManifest = ./build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Build.ps1
# Publish the module
./build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Publish.ps1 -ModuleManifestPath $moduleManifest -Repository PSGallery
Import-Module ./build/PSModulePublisher/src/PSModulePublisher -Force
$moduleManifest = Invoke-Build
Invoke-Publish -ModuleManifestPath $moduleManifest -Repository PSGallery
publish-draft-release:
needs: [publish-to-psgallery]
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"label": "Build: Generate module manifest",
"type": "shell",
"command": "MODULE_VERSION=${input:MODULE_VERSION} pwsh build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Build.ps1",
"command": "MODULE_VERSION=${input:MODULE_VERSION} pwsh -Command '$ErrorActionPreference = \"Stop\"; Import-Module ./build/PSModulePublisher/src/PSModulePublisher -Force; $moduleManifest = Invoke-Build'",
"group": "build"
},
{
Expand All @@ -41,7 +41,7 @@
"Build: Generate module manifest"
],
"type": "shell",
"command": "MODULE_NAME=$(basename $(pwd)); NUGET_API_KEY=${input:NUGET_API_KEY} MODULE_VERSION=${input:MODULE_VERSION} pwsh build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Publish.ps1 -ModuleManifestPath src/$MODULE_NAME/$MODULE_NAME.psd1 -Repository PSGallery -DryRun",
"command": "NUGET_API_KEY=${input:NUGET_API_KEY} MODULE_VERSION=${input:MODULE_VERSION} pwsh -Command '$ErrorActionPreference = \"Stop\"; Import-Module ./build/PSModulePublisher/src/PSModulePublisher -Force; $moduleManifest = Invoke-Build; Invoke-Publish -ModuleManifestPath $moduleManifest -Repository PSGallery -DryRun'",
"group": "build"
},
{
Expand All @@ -50,7 +50,7 @@
"Build: Generate module manifest"
],
"type": "shell",
"command": "MODULE_NAME=$(basename $(pwd)); NUGET_API_KEY=${input:NUGET_API_KEY} MODULE_VERSION=${input:MODULE_VERSION} pwsh build/PSModulePublisher/src/PSModulePublisher/Public/Invoke-Publish.ps1 -ModuleManifestPath src/$MODULE_NAME/$MODULE_NAME.psd1 -Repository PSGallery",
"command": "NUGET_API_KEY=${input:NUGET_API_KEY} MODULE_VERSION=${input:MODULE_VERSION} pwsh -Command '$ErrorActionPreference = \"Stop\"; Import-Module ./build/PSModulePublisher/src/PSModulePublisher -Force; $moduleManifest = Invoke-Build; Invoke-Publish -ModuleManifestPath $moduleManifest -Repository PSGallery'",
"group": "build"
},

Expand Down
2 changes: 1 addition & 1 deletion build/PSModulePublisher
Submodule PSModulePublisher updated 35 files
+121 −44 .github/workflows/ci-master-pr.yml
+10 −10 .vscode/tasks.json
+52 −15 README.md
+58 −0 build/definitions/modulemanifest.ps1
+16 −8 docs/samples/ci/azure-pipelines/azure-pipelines.linux.container.yml
+1 −1 docs/samples/ci/azure-pipelines/azure-pipelines.linux.sample.yml
+3 −3 docs/samples/ci/azure-pipelines/azure-pipelines.linux.windows.sample.yml
+1 −1 docs/samples/ci/azure-pipelines/azure-pipelines.macos.sample.yml
+1 −1 docs/samples/ci/azure-pipelines/azure-pipelines.windows.pwsh.sample.yml
+0 −24 docs/samples/test/scripts/dep/Install-TestDependencies.ps1
+0 −29 docs/samples/test/scripts/integration/Run-IntegrationTests.ps1
+52 −25 docs/samples/test/test.ps1
+17 −9 src/PSModulePublisher/PSModulePublisher.Tests.ps1
+133 −0 src/PSModulePublisher/PSModulePublisher.psd1
+13 −0 src/PSModulePublisher/PSModulePublisher.psm1
+48 −47 src/PSModulePublisher/Private/Generate-ModuleManifest.ps1
+28 −27 src/PSModulePublisher/Private/Get-ProjectVariables.ps1
+30 −29 src/PSModulePublisher/Private/Install-BuildDependencies.ps1
+0 −68 src/PSModulePublisher/Private/Publish-Module.ps1
+69 −0 src/PSModulePublisher/Private/Publish-MyModule.ps1
+24 −23 src/PSModulePublisher/Private/Test-Module.ps1
+0 −18 src/PSModulePublisher/Private/Test-ModuleManifest.ps1
+19 −0 src/PSModulePublisher/Private/Test-MyModuleManifest.ps1
+37 −37 src/PSModulePublisher/Public/Invoke-Build.ps1
+17 −26 src/PSModulePublisher/Public/Invoke-PSModulePublisher.ps1
+30 −30 src/PSModulePublisher/Public/Invoke-Publish.ps1
+20 −20 src/PSModulePublisher/Public/Invoke-Test.ps1
+2 −1 templates/azure-pipelines/steps/powershell/run-build.yml
+2 −1 templates/azure-pipelines/steps/powershell/run-publish.yml
+2 −1 templates/azure-pipelines/steps/powershell/run-test.yml
+2 −1 templates/azure-pipelines/steps/pwsh/run-build.yml
+2 −1 templates/azure-pipelines/steps/pwsh/run-publish.yml
+2 −1 templates/azure-pipelines/steps/pwsh/run-test.yml
+1 −1 test/Mock-Module/src/Mock-Module/Mock-Module.psd1
+60 −44 test/test.ps1

0 comments on commit 8c64f79

Please sign in to comment.