chore: add community files and PSGallery publish workflow

- Add CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md
- Add .gitattributes for line ending normalization
- Add GitHub issue templates (bug report, feature request)
- Add pull request template
- Add publish.yml workflow for PSGallery publication on tag push

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-20 12:22:13 -05:00
parent fac796ee43
commit a8a9cc28b1
8 changed files with 413 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
name: Bug Report
description: Report a bug in PSProxmoxVE
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug! Please fill out the sections below.
- type: input
id: module-version
attributes:
label: Module Version
description: Output of `(Get-Module PSProxmoxVE).Version`
placeholder: "0.1.0"
validations:
required: true
- type: input
id: pve-version
attributes:
label: Proxmox VE Version
description: PVE server version (e.g. 9.1-1, 8.4-1)
placeholder: "9.1-1"
validations:
required: true
- type: dropdown
id: ps-version
attributes:
label: PowerShell Version
options:
- "5.1 (Windows PowerShell)"
- "7.2"
- "7.4"
- "7.5"
- "Other"
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
options:
- Windows
- Linux
- macOS
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: What happened? What did you expect?
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to Reproduce
description: Minimal PowerShell commands to reproduce the issue
render: powershell
validations:
required: true
- type: textarea
id: error
attributes:
label: Error Output
description: Paste any error messages or verbose output
render: text
@@ -0,0 +1,37 @@
name: Feature Request
description: Suggest a new feature or enhancement
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting an improvement! Please describe what you'd like.
- type: textarea
id: description
attributes:
label: Description
description: What feature or improvement would you like?
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: How would you use this feature? What problem does it solve?
validations:
required: true
- type: textarea
id: api-endpoints
attributes:
label: PVE API Endpoints
description: If this involves specific PVE API endpoints, list them here
placeholder: "GET /nodes/{node}/qemu/{vmid}/firewall/rules"
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Have you considered any workarounds or alternative approaches?
+30
View File
@@ -0,0 +1,30 @@
## Summary
<!-- Brief description of the change -->
## Type of Change
- [ ] Bug fix
- [ ] New feature (new cmdlet, new parameter, etc.)
- [ ] Enhancement (improvement to existing functionality)
- [ ] Documentation
- [ ] CI/CD
- [ ] Refactoring (no functional change)
## Checklist
- [ ] `dotnet build` succeeds with zero warnings
- [ ] xUnit tests pass (`dotnet test`)
- [ ] Pester tests pass (`Invoke-Pester -ExcludeTag Integration`)
- [ ] New cmdlets added to `CmdletsToExport` in `PSProxmoxVE.psd1`
- [ ] New cmdlets have Pester unit tests
- [ ] `CHANGELOG.md` updated under `[Unreleased]`
- [ ] README cmdlet reference updated (if adding new cmdlets)
## PVE API Endpoints
<!-- If this change adds or modifies API calls, list the endpoints -->
## Testing
<!-- How was this tested? Against which PVE version(s)? -->
+72
View File
@@ -0,0 +1,72 @@
name: Publish to PSGallery
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.0.x'
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Build module
run: dotnet publish src/PSProxmoxVE/PSProxmoxVE.csproj --configuration Release --framework netstandard2.0 --output ./publish/netstandard2.0
- name: Clean publish output
run: rm -f ./publish/netstandard2.0/*.deps.json ./publish/netstandard2.0/*.runtimeconfig.json
- name: Update module version in manifest
shell: pwsh
run: |
$manifestPath = './publish/netstandard2.0/PSProxmoxVE.psd1'
$version = '${{ steps.version.outputs.version }}'
# Strip prerelease suffix for ModuleVersion (must be X.Y.Z)
$moduleVersion = ($version -split '-')[0]
$content = Get-Content $manifestPath -Raw
$content = $content -replace "ModuleVersion\s*=\s*'[^']*'", "ModuleVersion = '$moduleVersion'"
Set-Content $manifestPath $content
- name: Install PowerShell and Pester
shell: pwsh
run: Install-Module -Name Pester -MinimumVersion 5.0 -Force -Scope CurrentUser
- name: Test module loads
shell: pwsh
run: |
$modulePath = "$HOME/.local/share/powershell/Modules/PSProxmoxVE"
New-Item -ItemType Directory -Path $modulePath -Force | Out-Null
Copy-Item -Path ./publish/netstandard2.0/* -Destination $modulePath -Recurse -Force
Import-Module PSProxmoxVE -Force -ErrorAction Stop
$commands = Get-Command -Module PSProxmoxVE
Write-Host "Module loaded with $($commands.Count) commands"
if ($commands.Count -lt 60) {
throw "Expected at least 60 commands, got $($commands.Count)"
}
- name: Publish to PSGallery
shell: pwsh
env:
NUGET_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
run: |
Publish-Module -Path ./publish/netstandard2.0 -NuGetApiKey $env:NUGET_API_KEY -Verbose
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true