Skip to content

Commit ee6798e

Browse files
🌟 [Major]: Process-PSModule v5 (#205)
This pull request cleans up and consolidates the process into focussing on a single workflow, the `workflow.yml` file. It also updates some more logic and addresses some security issues for the checkout action. ## Details - Removed the workflow `CI.yml` which has previously been used for nightly runs, checking that the logic works. - Mitigation: Adjusted `workflow.yml` to work for the same scenarios replacing `CI.yml` for this usecase. - Fixes #204 - Cleaned up some of the job flow depending on the different scenarios. | Job | Open/Updated PR | Merged PR | Abandoned PR | Manual Run | |-----|-----------------|-----------|--------------|------------| | **Get-Settings** | ✅ Always | ✅ Always | ✅ Always | ✅ Always | | **Lint-Repository** | ✅ Yes | ❌ No | ❌ No | ❌ No | | **Build-Module** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Build-Docs** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Build-Site** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Test-SourceCode** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Lint-SourceCode** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Test-Module** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **BeforeAll-ModuleLocal** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Test-ModuleLocal** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **AfterAll-ModuleLocal** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Get-TestResults** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Get-CodeCoverage** | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | | **Publish-Site** | ❌ No | ✅ Yes (only) | ❌ No | ❌ No | | **Publish-Module** | ✅ Yes* | ✅ Yes* | ✅ Yes | ✅ Yes* | - Only run linter on CI runs. - Fast forward to "Publish-Module", which also handles removal of prereleases (GitHub only). - Only run "Publish-Site" on a merged PR.
1 parent 5726f53 commit ee6798e

17 files changed

+421
-680
lines changed

.github/copilot-instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,11 @@ pwsh -Command "ls -Recurse"
4949
gh issue create --title "Feature" --body "Description"
5050
```
5151

52+
## Other instructions
53+
54+
| Tech | Instruction file |
55+
|------|------------------|
56+
| PowerShell | [pwsh.instructions.md](./instructions/pwsh.instructions.md) |
57+
| Markdown | [md.instructions.md](./instructions/md.instructions.md) |
58+
5259
<!-- MANUAL ADDITIONS END -->

.github/prompts/implement.prompt.md

Lines changed: 143 additions & 183 deletions
Large diffs are not rendered by default.

.github/workflows/Build-Docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
- name: Checkout Code
4545
uses: actions/checkout@v5
4646
with:
47+
persist-credentials: false
4748
fetch-depth: 0
4849

4950
- name: Download module artifact

.github/workflows/Build-Module.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
steps:
3131
- name: Checkout Code
3232
uses: actions/checkout@v5
33+
with:
34+
persist-credentials: false
35+
fetch-depth: 0
3336

3437
- name: Build module
3538
uses: PSModule/Build-PSModule@v4

.github/workflows/Build-Site.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
- name: Checkout Code
4545
uses: actions/checkout@v5
4646
with:
47+
persist-credentials: false
4748
fetch-depth: 0
4849

4950
- name: Install-PSModuleHelpers

.github/workflows/CI.yml

Lines changed: 0 additions & 324 deletions
This file was deleted.

.github/workflows/Get-Settings.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ jobs:
6666
steps:
6767
- name: Checkout Code
6868
uses: actions/checkout@v5
69+
with:
70+
persist-credentials: false
71+
fetch-depth: 0
6972

7073
- name: Get-Settings
7174
uses: PSModule/GitHub-Script@v1

.github/workflows/Lint-SourceCode.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
steps:
5252
- name: Checkout Code
5353
uses: actions/checkout@v5
54+
with:
55+
persist-credentials: false
56+
fetch-depth: 0
5457

5558
- name: Lint-SourceCode
5659
uses: PSModule/Invoke-ScriptAnalyzer@v3

.github/workflows/Linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- name: Checkout repo
2222
uses: actions/checkout@v5
2323
with:
24+
persist-credentials: false
2425
fetch-depth: 0
2526

2627
- name: Lint code base

0 commit comments

Comments
 (0)