build(deps): bump actions/checkout to v6.0.0 in workflows #97
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run tests | |
| shell: pwsh | |
| run: | | |
| Test-ModuleManifest -Path .\PSF.psd1 -Verbose -ErrorAction Stop | |
| .\.ExecuteTests.ps1 | |
| deploy: | |
| name: Tag and Deploy | |
| runs-on: windows-latest | |
| needs: [test] | |
| if: contains(github.ref, 'master') | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v4.0.1 | |
| with: | |
| versionSpec: "6.x" | |
| - name: Version with GitVersion # https://github.com/marketplace/actions/use-actions | |
| id: gitversion | |
| uses: gittools/actions/gitversion/execute@v4.0.1 | |
| - name: Push version tag | |
| uses: tvdias/github-tagger@v0.0.2 | |
| continue-on-error: true | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ steps.gitversion.outputs.FullSemVer }} | |
| - name: Update module manifest | |
| shell: pwsh | |
| run: | | |
| Update-ModuleManifest -Path .\PSF.psd1 -ModuleVersion ${{ steps.gitversion.outputs.MajorMinorPatch }} | |
| - name: Update copyright year | |
| shell: pwsh | |
| run: | | |
| $year = (Get-Date).Year | |
| (Get-Content .\PSF.psd1) -replace "(?<=Copyright\s*=\s*'\(c\) )\d{4}", $year | Set-Content .\PSF.psd1 | |
| - name: Copy files to staging directory | |
| shell: pwsh | |
| run: | | |
| $DestPath = ".\Modules\PSF\" | |
| New-Item -Path $DestPath -Type Directory -Force | |
| Copy-Item .\PSF.ps* $DestPath | |
| Copy-Item .\functions $DestPath -Recurse | |
| - name: Publish to gallery | |
| env: | |
| NUGET_KEY: ${{ secrets.NUGET_KEY }} | |
| shell: pwsh | |
| run: | | |
| Publish-Module -Path ".\Modules\PSF\" -NuGetApiKey $env:NUGET_KEY -Verbose |