mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-31 17:28:06 +00:00
Merge pull request #40 from GoodOlClint/fix/publish-module-path
fix: publish workflow module path must match module name
This commit is contained in:
@@ -70,7 +70,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v8
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: module-netstandard2.0
|
name: module-netstandard2.0
|
||||||
path: ./publish/netstandard2.0/
|
path: ./publish/PSProxmoxVE/
|
||||||
|
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: version
|
id: version
|
||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
- name: Update module version in manifest
|
- name: Update module version in manifest
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$manifestPath = './publish/netstandard2.0/PSProxmoxVE.psd1'
|
$manifestPath = './publish/PSProxmoxVE/PSProxmoxVE.psd1'
|
||||||
$version = '${{ steps.version.outputs.version }}'
|
$version = '${{ steps.version.outputs.version }}'
|
||||||
# Strip prerelease suffix for ModuleVersion (must be X.Y.Z)
|
# Strip prerelease suffix for ModuleVersion (must be X.Y.Z)
|
||||||
$moduleVersion = ($version -split '-')[0]
|
$moduleVersion = ($version -split '-')[0]
|
||||||
@@ -92,7 +92,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$modulePath = "$HOME/.local/share/powershell/Modules/PSProxmoxVE"
|
$modulePath = "$HOME/.local/share/powershell/Modules/PSProxmoxVE"
|
||||||
New-Item -ItemType Directory -Path $modulePath -Force | Out-Null
|
New-Item -ItemType Directory -Path $modulePath -Force | Out-Null
|
||||||
Copy-Item -Path ./publish/netstandard2.0/* -Destination $modulePath -Recurse -Force
|
Copy-Item -Path ./publish/PSProxmoxVE/* -Destination $modulePath -Recurse -Force
|
||||||
Import-Module PSProxmoxVE -Force -ErrorAction Stop
|
Import-Module PSProxmoxVE -Force -ErrorAction Stop
|
||||||
$commands = Get-Command -Module PSProxmoxVE
|
$commands = Get-Command -Module PSProxmoxVE
|
||||||
Write-Host "Module loaded with $($commands.Count) commands"
|
Write-Host "Module loaded with $($commands.Count) commands"
|
||||||
@@ -105,7 +105,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
|
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
|
||||||
run: |
|
run: |
|
||||||
Publish-Module -Path ./publish/netstandard2.0 -NuGetApiKey $env:NUGET_API_KEY -Verbose
|
Publish-Module -Path ./publish/PSProxmoxVE -NuGetApiKey $env:NUGET_API_KEY -Verbose
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
|||||||
Reference in New Issue
Block a user