From 50f979961e361c417d2dfbd057b0e92219eff3ae Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sun, 12 Oct 2025 09:59:09 -0400 Subject: [PATCH 1/4] Update RequiredModules to specify AsBuiltReport.Core version as '1.4.3'. Fix iisue with powershellgallery not finding prerelease version 1.5.0 --- AsBuiltReport.System.Resources.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsBuiltReport.System.Resources.psd1 b/AsBuiltReport.System.Resources.psd1 index 9ba503a..8642e8e 100644 --- a/AsBuiltReport.System.Resources.psd1 +++ b/AsBuiltReport.System.Resources.psd1 @@ -55,7 +55,7 @@ RequiredModules = @( @{ ModuleName = 'AsBuiltReport.Core'; - ModuleVersion = '1.5.0' + ModuleVersion = '1.4.3' } ) From caa0e7ce499ce5cc264d373927fb5daa1c6d9dbd Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sun, 12 Oct 2025 10:00:12 -0400 Subject: [PATCH 2/4] Refactor Release.yml for improved readability and structure --- .github/workflows/Release.yml | 96 +++++++++++++++++------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index a857717..3768003 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -1,53 +1,53 @@ name: Publish PowerShell Module on: - release: - types: [published] + release: + types: [published] jobs: - publish-to-gallery: - runs-on: windows-latest - steps: - - uses: actions/checkout@v5 - - name: Set PSRepository to Trusted for PowerShell Gallery - shell: pwsh - run: | - Set-PSRepository -Name PSGallery -InstallationPolicy Trusted - - name: Install AsBuiltReport.Core module - shell: pwsh - run: | - Install-Module -Name AsBuiltReport.Core -Repository PSGallery -AllowPrerelease -Force - - name: Test Module Manifest - shell: pwsh - run: | - Test-ModuleManifest .\AsBuiltReport.System.Resources.psd1 - - name: Publish module to PowerShell Gallery - shell: pwsh - run: | - Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose - tweet: - needs: publish-to-gallery - runs-on: ubuntu-latest - steps: - - uses: Eomm/why-don-t-you-tweet@v2 - # We don't want to tweet if the repository is not a public one - if: ${{ !github.event.repository.private }} - with: - # GitHub event payload - # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release - tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #System #Resources #AsBuiltReport #PowerShell" - env: - TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} - TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} - TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} - TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} - bsky-post: - needs: publish-to-gallery - runs-on: ubuntu-latest - steps: - - uses: zentered/bluesky-post-action@v0.3.0 - with: - post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #System #Resources #AsBuiltReport #PowerShell" - env: - BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} - BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} + publish-to-gallery: + runs-on: windows-latest + steps: + - uses: actions/checkout@v5 + - name: Set PSRepository to Trusted for PowerShell Gallery + shell: pwsh + run: | + Set-PSRepository -Name PSGallery -InstallationPolicy Trusted + - name: Install AsBuiltReport.Core module + shell: pwsh + run: | + Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force + - name: Test Module Manifest + shell: pwsh + run: | + Test-ModuleManifest .\AsBuiltReport.System.Resources.psd1 + - name: Publish module to PowerShell Gallery + shell: pwsh + run: | + Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose + tweet: + needs: publish-to-gallery + runs-on: ubuntu-latest + steps: + - uses: Eomm/why-don-t-you-tweet@v2 + # We don't want to tweet if the repository is not a public one + if: ${{ !github.event.repository.private }} + with: + # GitHub event payload + # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release + tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #System #Resources #AsBuiltReport #PowerShell" + env: + TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} + TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + bsky-post: + needs: publish-to-gallery + runs-on: ubuntu-latest + steps: + - uses: zentered/bluesky-post-action@v0.3.0 + with: + post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #System #Resources #AsBuiltReport #PowerShell" + env: + BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} + BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} From f66a52bb8227a86bd9177eaf2861429c60c501e2 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sun, 12 Oct 2025 10:04:29 -0400 Subject: [PATCH 3/4] Update PSScriptAnalyzer.yml to use actions/checkout@v5 and improve formatting; update Stale.yml to use actions/stale@v10 --- .github/workflows/PSScriptAnalyzer.yml | 28 +++++++++++++------------- .github/workflows/Stale.yml | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/PSScriptAnalyzer.yml b/.github/workflows/PSScriptAnalyzer.yml index 57b2ea4..4ceb496 100644 --- a/.github/workflows/PSScriptAnalyzer.yml +++ b/.github/workflows/PSScriptAnalyzer.yml @@ -1,17 +1,17 @@ name: PSScriptAnalyzer on: [push, pull_request] jobs: - lint: - name: Run PSScriptAnalyzer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: lint - uses: devblackops/github-action-psscriptanalyzer@master - with: - sendComment: true - failOnErrors: true - failOnWarnings: false - failOnInfos: false - repoToken: ${{ secrets.GITHUB_TOKEN }} - settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 \ No newline at end of file + lint: + name: Run PSScriptAnalyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: lint + uses: devblackops/github-action-psscriptanalyzer@master + with: + sendComment: true + failOnErrors: true + failOnWarnings: false + failOnInfos: false + repoToken: ${{ secrets.GITHUB_TOKEN }} + settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 diff --git a/.github/workflows/Stale.yml b/.github/workflows/Stale.yml index afebe72..f37dca9 100644 --- a/.github/workflows/Stale.yml +++ b/.github/workflows/Stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' days-before-stale: 30 From 1c00c40d3c4ab11ec45b3a5dae7a3b7084c7cf29 Mon Sep 17 00:00:00 2001 From: Jonathan Colon Date: Sun, 12 Oct 2025 10:06:09 -0400 Subject: [PATCH 4/4] Update suppression message scopes in Invoke-AsBuiltReport.System.Resources.ps1 to 'function' --- Src/Public/Invoke-AsBuiltReport.System.Resources.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Public/Invoke-AsBuiltReport.System.Resources.ps1 b/Src/Public/Invoke-AsBuiltReport.System.Resources.ps1 index 4b26f63..dd208f3 100644 --- a/Src/Public/Invoke-AsBuiltReport.System.Resources.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.System.Resources.ps1 @@ -15,8 +15,8 @@ function Invoke-AsBuiltReport.System.Resources { https://github.com/AsBuiltReport/AsBuiltReport.System.Resources #> - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "", Scope = "Script")] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Scope = "Script")] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "", Scope = "function")] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Scope = "function")] # Do not remove or add to these parameters