diff --git a/.github/workflows/defender-for-devops.yml b/.github/workflows/defender-for-devops.yml index 7307f85..b76f822 100644 --- a/.github/workflows/defender-for-devops.yml +++ b/.github/workflows/defender-for-devops.yml @@ -35,8 +35,8 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-dotnet@v6 with: dotnet-version: | 5.0.x diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml index e375766..2179c2f 100644 --- a/.github/workflows/devskim.yml +++ b/.github/workflows/devskim.yml @@ -23,7 +23,7 @@ jobs: security-events: write steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Run DevSkim scanner uses: microsoft/DevSkim-Action@v1 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index bc5012f..2286cae 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,10 +15,10 @@ jobs: name: Run Tests runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x @@ -55,14 +55,14 @@ jobs: - name: Post coverage comment on PR if: always() && github.event_name == 'pull_request' - uses: marocchino/sticky-pull-request-comment@v2 + uses: marocchino/sticky-pull-request-comment@v3 with: header: coverage path: coverage-report/SummaryGithub.md - name: Upload coverage report if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: coverage-report path: coverage-report/ diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 3d1f567..18485ca 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -28,7 +28,7 @@ jobs: actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Install ESLint run: | diff --git a/.github/workflows/maintain-copilot-instructions.yml b/.github/workflows/maintain-copilot-instructions.yml index 1822b9a..571c9b0 100644 --- a/.github/workflows/maintain-copilot-instructions.yml +++ b/.github/workflows/maintain-copilot-instructions.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Detect projects not documented in copilot-instructions.md id: check diff --git a/.github/workflows/powershell.yml b/.github/workflows/powershell.yml index aa8b453..cb25a34 100644 --- a/.github/workflows/powershell.yml +++ b/.github/workflows/powershell.yml @@ -29,7 +29,7 @@ jobs: name: PSScriptAnalyzer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Run PSScriptAnalyzer uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d005744..5b94afb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,8 @@ name: .NET Continuous Deployment on: + push: + branches: [ main ] workflow_dispatch: permissions: @@ -14,10 +16,12 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x @@ -31,10 +35,10 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x @@ -55,7 +59,7 @@ jobs: run: dotnet build -c Release SharedCode.sln && dotnet pack -c Release -p:PackageVersion=${{ steps.tag_version.outputs.new_version }} -o . SharedCode.sln - name: Upload Package for Publishing - uses: actions/upload-artifact@v4.6.1 + uses: actions/upload-artifact@v5 with: name: PackedLib path: ./*.nupkg @@ -68,12 +72,12 @@ jobs: packages: write steps: - name: Download built project - uses: actions/download-artifact@v4.1.8 + uses: actions/download-artifact@v5 with: name: PackedLib - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x @@ -88,12 +92,12 @@ jobs: packages: write steps: - name: Download built project - uses: actions/download-artifact@v4.1.8 + uses: actions/download-artifact@v5 with: name: PackedLib - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x diff --git a/.github/workflows/snyk-security.yml b/.github/workflows/snyk-security.yml index 578dcae..192453e 100644 --- a/.github/workflows/snyk-security.yml +++ b/.github/workflows/snyk-security.yml @@ -35,7 +35,7 @@ jobs: actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Snyk CLI to check for security issues # Snyk can be used to break the build when it detects security issues. # In this case we want to upload the SAST issues to GitHub Code Scanning diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml new file mode 100644 index 0000000..d78a4d0 --- /dev/null +++ b/.github/workflows/update-copyright.yml @@ -0,0 +1,51 @@ +name: Update Copyright Year + +on: + schedule: + - cron: '0 0 1 1 *' # January 1st at midnight UTC + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + update-copyright: + name: Update Copyright Year + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Update copyright year + id: update + shell: pwsh + run: | + $year = (Get-Date).Year + $files = @("Directory.Build.props", "README.md") + $changed = $false + foreach ($file in $files) { + $content = Get-Content $file -Raw + $updated = $content -replace 'Copyright © \d{4}', "Copyright © $year" + if ($updated -ne $content) { + [System.IO.File]::WriteAllText($file, $updated) + $changed = $true + Write-Output "Updated $file" + } + } + echo "changed=$($changed.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT + echo "year=$year" >> $env:GITHUB_OUTPUT + + - name: Create pull request + if: steps.update.outputs.changed == 'true' + uses: peter-evans/create-pull-request@v7 + with: + commit-message: "chore: update copyright year" + branch: chore/update-copyright-year-${{ steps.update.outputs.year }} + title: "chore: update copyright year to ${{ steps.update.outputs.year }}" + body: | + Automated annual copyright year update. + + This pull request was created by the `update-copyright` workflow. + labels: automated diff --git a/Directory.Build.props b/Directory.Build.props index 3595c88..827dc98 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,7 +9,7 @@ true true improvGroup, LLC - Copyright © 2025 improvGroup, LLC and contributors. All Rights Reserved. + Copyright © 2026 improvGroup, LLC and contributors. All Rights Reserved. portable A library of code shared for free use to help with common scenarios. true @@ -54,7 +54,7 @@ $([System.DateTime]::op_Subtraction($([System.DateTime]::get_Now().get_Date()),$([System.DateTime]::new(2000,1,1))).get_TotalDays()) $([MSBuild]::Divide($([System.DateTime]::get_Now().get_TimeOfDay().get_TotalSeconds()), 2).ToString('F0')) - 7.4.$(Build).$(Revision) + 7.5.$(Build).$(Revision) diff --git a/README.md b/README.md index 7f2860d..1cd8d31 100644 --- a/README.md +++ b/README.md @@ -358,4 +358,4 @@ contributing. ## License This project is licensed under the [MIT License](LICENSE). -Copyright © 2025 [improvGroup, LLC](https://github.com/improvgroup) and contributors. +Copyright © 2026 [improvGroup, LLC](https://github.com/improvgroup) and contributors.