Skip to content

Commit 4c8d39e

Browse files
committed
👷 [ci] Enhance publish workflow and update docs
This commit introduces several improvements to the CI/CD pipeline, project documentation, and license. * 👷 [ci] Refines the `publish.yml` GitHub Actions workflow. * Improves build validation logic by checking for the module manifest's existence and validity directly within the build step. * Removes the less reliable check on `$LASTEXITCODE`, preventing false negatives and ensuring a valid module is built before proceeding. * 📝 [docs] Updates the `README.md` with significant enhancements. * Adds a new project mascot image for better visual appeal. * Integrates a Codecov badge to display test coverage status. * Includes a new "Testing" section with detailed instructions on running Pester tests and generating coverage reports. * 📝 [docs] Changes the project license from MIT to The Unlicense. * Updates the `LICENSE` badge and the "License" section in the `README.md` to reflect this change. * 🧹 [chore] Bumps the module version to `2025.10.26.1439`. * Updates the module manifest (`.psd1`) and release notes with the new version number. Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
1 parent 3bfb155 commit 4c8d39e

3 files changed

Lines changed: 48 additions & 23 deletions

File tree

.github/workflows/publish.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,20 @@ jobs:
9090
Write-Host "Executing build script..." -ForegroundColor Yellow
9191
& .\scripts\build.ps1
9292
93-
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) {
94-
throw "Build script failed with exit code: $LASTEXITCODE"
93+
# Only fail if the manifest wasn't created successfully
94+
$manifestPath = ".\ColorScripts-Enhanced\ColorScripts-Enhanced.psd1"
95+
if (-not (Test-Path $manifestPath)) {
96+
throw "Module manifest not found after build: $manifestPath"
97+
}
98+
99+
# Test manifest is valid
100+
try {
101+
$manifest = Test-ModuleManifest -Path $manifestPath -ErrorAction Stop
102+
Write-Host "Manifest validation successful. Version: $($manifest.Version)" -ForegroundColor Green
103+
}
104+
catch {
105+
Write-Host "Manifest validation failed: $_" -ForegroundColor Red
106+
throw
95107
}
96108
97109
Write-Host "Build completed successfully!" -ForegroundColor Green
@@ -100,22 +112,6 @@ jobs:
100112
Write-Host "Build failed: $_" -ForegroundColor Red
101113
throw
102114
}
103-
104-
# Verify manifest was updated
105-
$manifestPath = ".\ColorScripts-Enhanced\ColorScripts-Enhanced.psd1"
106-
if (-not (Test-Path $manifestPath)) {
107-
throw "Module manifest not found after build: $manifestPath"
108-
}
109-
110-
# Test manifest is valid
111-
try {
112-
$manifest = Test-ModuleManifest -Path $manifestPath -ErrorAction Stop
113-
Write-Host "Manifest validation successful. Version: $($manifest.Version)" -ForegroundColor Green
114-
}
115-
catch {
116-
Write-Host "Manifest validation failed: $_" -ForegroundColor Red
117-
throw
118-
}
119115
shell: pwsh
120116

121117
- name: Run Script Analyzer

ColorScripts-Enhanced/ColorScripts-Enhanced.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
RootModule = 'ColorScripts-Enhanced.psm1'
1212

1313
# Version number of this module.
14-
ModuleVersion = '2025.10.26.1403'
14+
ModuleVersion = '2025.10.26.1439'
1515

1616
# Supported PSEditions
1717
CompatiblePSEditions = @('Desktop', 'Core')
@@ -172,7 +172,7 @@ Full documentation: https://github.com/Nick2bad4u/ps-color-scripts-enhanced
172172

173173
# ReleaseNotes of this module
174174
ReleaseNotes = @'
175-
Version 2025.10.26.1403:
175+
Version 2025.10.26.1439:
176176
- Enhanced caching system with OS-wide cache in AppData
177177
- 6-19x performance improvement
178178
- Cache stored in centralized location

ColorScripts-Enhanced/README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<!-- CI/CD & Quality Badges -->
1414

1515
[![Tests](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/test.yml/badge.svg)](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/test.yml)
16+
[![codecov](https://codecov.io/gh/Nick2bad4u/ps-color-scripts-enhanced/branch/main/graph/badge.svg)](https://codecov.io/gh/Nick2bad4u/ps-color-scripts-enhanced)
1617
[![Publish](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/publish.yml/badge.svg)](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/actions/workflows/publish.yml)
1718
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Nick2bad4u/PS-Color-Scripts-Enhanced/badge)](https://scorecard.dev/viewer/?uri=github.com/Nick2bad4u/PS-Color-Scripts-Enhanced)
1819
[![Dependency Review](https://github.com/Nick2bad4u/PS-Color-Scripts-Enhanced/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/Nick2bad4u/PS-Color-Scripts-Enhanced/actions/workflows/dependency-review.yml)
@@ -26,11 +27,15 @@
2627

2728
<!-- License & Contributing -->
2829

29-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
30+
[![License: UnLicense](https://img.shields.io/badge/License-UnLicense-yellow.svg)](LICENSE)
3031
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
3132

3233
A high-performance PowerShell module for displaying beautiful ANSI colorscripts in your terminal with intelligent caching for 6-19x faster load times.
3334

35+
<p align="center">
36+
<img src="assets/ColorScripts-Mascot-Dark.jpeg" alt="ColorScripts mascot" width="60%" />
37+
</p>
38+
3439
## Table of Contents
3540

3641
- [Features](#features)
@@ -639,7 +644,7 @@ Contributions welcome! When adding new colorscripts:
639644

640645
## License
641646

642-
MIT License – see [LICENSE](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/LICENSE) file for details
647+
UnLicense License – see [LICENSE](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/LICENSE) file for details
643648

644649
## Version History
645650

@@ -668,9 +673,33 @@ See [CHANGELOG.md](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/
668673
## CI/CD & Workflows
669674

670675
- ⚙️ [Test Workflow](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/.github/workflows/test.yml)
671-
- 📦 [Publish Workflow](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/.github/workflows/publish.yml)
676+
-[Code Coverage](https://codecov.io/gh/Nick2bad4u/ps-color-scripts-enhanced) - Automated via Codecov
677+
- �📦 [Publish Workflow](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/.github/workflows/publish.yml)
672678
- 🤖 [Dependabot Updates](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/.github/dependabot.yml)
673679

680+
## Testing
681+
682+
This module uses [Pester](https://pester.dev/) for testing with code coverage tracking:
683+
684+
```powershell
685+
# Run all tests
686+
npm run test
687+
688+
# Run tests with coverage report
689+
npm run test:coverage
690+
691+
# Generate HTML coverage report (requires ReportGenerator)
692+
npm run test:coverage:report
693+
694+
# Run tests directly with Pester
695+
Invoke-Pester -Path ./Tests
696+
697+
# Run with coverage using the script
698+
./scripts/Test-Coverage.ps1 -ShowReport
699+
```
700+
701+
Coverage reports are automatically uploaded to [Codecov](https://codecov.io/gh/Nick2bad4u/ps-color-scripts-enhanced) on every push.
702+
674703
## Support
675704

676705
For support options, response targets, and contact channels, review the [Support Policy](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/blob/main/docs/SUPPORT.md). Bug reports and feature ideas live in the [issue tracker](https://github.com/Nick2bad4u/ps-color-scripts-enhanced/issues).

0 commit comments

Comments
 (0)