Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/pull_request_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ on:
- synchronize

jobs:
test:
test-module:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
Expand Down Expand Up @@ -60,15 +63,25 @@ jobs:

Write-Output "✓ All $($exportedFunctions.Count) exported functions have corresponding markdown files"

- name: Test XML Help Generation
- name: Generate XML Help
shell: pwsh
run: New-ExternalHelp -Path ".\docs" -OutputPath "." -Force

- name: Commit and Push Help Updates
shell: pwsh
run: |
New-ExternalHelp -Path ".\docs" -OutputPath ".\test-help" -Force
if (-not (Test-Path ".\test-help\PowerAzPlus-help.xml")) {
Write-Error "Failed to generate help XML"
exit 1
git config user.email "github-actions@github.com"
git config user.name "GitHub Actions"
git fetch origin ${{ github.head_ref }}
git checkout ${{ github.head_ref }}
git add PowerAzPlus-help.xml
if (!(git diff --cached --quiet)) {
git commit -m "update help documentation"
git push origin ${{ github.head_ref }}
} else {
Write-Host "No changes to help file"
}
Write-Output "Help XML generated successfully"
continue-on-error: true

- name: Test publish to PowerShell Gallery
shell: pwsh
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/pull_request_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install PlatyPS
shell: pwsh
run: Install-Module -Name PlatyPS -Force -Scope CurrentUser

- name: Generate XML Help
shell: pwsh
run: New-ExternalHelp -Path ".\docs" -OutputPath "." -Force

- name: Commit and Push Help Updates
shell: pwsh
run: |
git config user.email "github-actions@github.com"
git config user.name "GitHub Actions"
git add PowerAzPlus-help.xml
git commit -m "chore: update help documentation" || echo "No changes to help file"
git push

- name: Publish module to PowerShell Gallery
shell: pwsh
Expand Down
Loading