diff --git a/.github/workflows/gallery-downloads.yml b/.github/workflows/gallery-downloads.yml new file mode 100644 index 0000000..d7c6301 --- /dev/null +++ b/.github/workflows/gallery-downloads.yml @@ -0,0 +1,21 @@ +name: Gallery downloads badge + +# The PowerShell Gallery's per-package download total is broken (PowerShell/PowerShellGallery#347, +# #350): it reads 0 for this module while the per-version counts still move. The reusable workflow +# in fadwen/IntuneScriptLab sums those counts and publishes a shields.io endpoint badge on this +# repository's badges branch, which the README reads. + +on: + schedule: + - cron: '17 6 * * *' + workflow_dispatch: + +permissions: + contents: write + +jobs: + badge: + uses: fadwen/IntuneScriptLab/.github/workflows/gallery-downloads.yml@main + with: + package: TestEnvironment + label: PowerShell Gallery Downloads diff --git a/CHANGELOG.md b/CHANGELOG.md index 10eac16..37c78a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,12 @@ All notable changes to this module are recorded here. Format follows ## [Unreleased] -Nothing yet. +### Changed + +- The README's Gallery downloads badge sums the per-version download counts instead of reading + the Gallery's total, which is broken (PowerShell/PowerShellGallery#347 and #350: it reads 0 for + this module). `.github/workflows/gallery-downloads.yml` calls the reusable workflow in + fadwen/IntuneScriptLab daily and publishes the figure to a `badges` branch when it changes. ## [1.5.0] - 2026-09-29 diff --git a/README.md b/README.md index b0c80af..d88a1ab 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # TestEnvironment [![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/TestEnvironment?label=PowerShell%20Gallery&color=blue)](https://www.powershellgallery.com/packages/TestEnvironment) -[![PowerShell Gallery Downloads](https://img.shields.io/powershellgallery/dt/TestEnvironment?color=blue)](https://www.powershellgallery.com/packages/TestEnvironment) +[![PowerShell Gallery Downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffadwen%2FTestEnvironment%2Fbadges%2Fdownloads.json&color=blue)](https://www.powershellgallery.com/packages/TestEnvironment) [![Quality Gates](https://github.com/fadwen/TestEnvironment/actions/workflows/quality-gates.yml/badge.svg)](https://github.com/fadwen/TestEnvironment/actions/workflows/quality-gates.yml) [![PowerShell 5.1 and 7](https://img.shields.io/badge/PowerShell-5.1%20%7C%207-blue)](https://github.com/PowerShell/PowerShell) [![Platforms](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey)](#-installation)