Skip to content
Merged
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
31 changes: 19 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
Expand All @@ -51,12 +51,19 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add PSWriteHTML.psd1
git commit -m "chore: regenerate psd1" || echo "No changes to commit"
git push origin HEAD:$Env:HEAD_BRANCH
git diff --cached --quiet
if ($LASTEXITCODE -eq 0) {
Write-Host "No PSD1 changes to commit."
} elseif ($LASTEXITCODE -eq 1) {
git commit -m "chore: regenerate psd1"
git push origin HEAD:$Env:HEAD_BRANCH
} else {
throw "Unable to inspect staged PSD1 changes (git exit code $LASTEXITCODE)."
}
shell: pwsh

- name: Upload refreshed manifest
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: psd1
path: PSWriteHTML.psd1
Expand All @@ -68,10 +75,10 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Download manifest
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: psd1
path: .
Expand All @@ -94,10 +101,10 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Download manifest
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: psd1
path: .
Expand All @@ -120,10 +127,10 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Download manifest
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: psd1
path: .
Expand Down Expand Up @@ -153,10 +160,10 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Download manifest
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: psd1
path: .
Expand Down