Make ShellLinkFile publicly accessible for callers.
#14
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
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell | |
| # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | |
| # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-powershell | |
| # https://github.com/actions/upload-artifact#where-does-the-upload-go | |
| name: PSAppDeployToolkit-Windows-PowerShell | |
| on: | |
| pull_request: | |
| push: | |
| permissions: | |
| id-token: write # Require write permission to Fetch an OIDC token. | |
| contents: read | |
| env: | |
| NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Display the path | |
| shell: powershell | |
| run: echo ${env:PATH} | |
| - name: Version Display | |
| shell: powershell | |
| run: $PSVersionTable | |
| # actions/setup-dotnet caching is unwieldy with multiple projects | |
| # https://github.com/NuGet/Home/issues/12409 | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.NUGET_PACKAGES }} | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Cache PowerShell modules | |
| uses: potatoqualitee/psmodulecache@v6.2.1 | |
| with: | |
| modules-to-cache: PSScriptAnalyzer:1.24.0, Pester:5.7.1, platyPS:0.14.2, Alt3.Docusaurus.Powershell:1.0.37 | |
| shell: powershell | |
| - name: Test and Build | |
| shell: cmd | |
| run: powershell.exe -ExecutionPolicy Bypass -File build.ps1 | |
| - name: Install AzureSignTool | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/4.0.x' || github.ref == 'refs/heads/4.1.x' | |
| run: dotnet tool install --global azuresigntool | |
| - name: Azure Login | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/4.0.x' || github.ref == 'refs/heads/4.1.x' | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Sign module source | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/4.0.x' || github.ref == 'refs/heads/4.1.x' | |
| shell: powershell | |
| run: | | |
| Get-ChildItem -Path "$($PWD)\src\Artifacts\ModuleOnly\PSAppDeployToolkit" -Include '*.ps*1', 'PSAppDeployToolkit.dll', 'PSADT*.dll', 'PSADT*.exe', 'iNKORE.UI.WPF*.dll', 'Invoke-AppDeployToolkit.exe' -Recurse | Select-Object -ExpandProperty FullName | Out-File "FilesToSign.txt" | |
| & azuresigntool.exe sign -s -kvu https://psadt-kv-prod-codesign.vault.azure.net -kvc PSADT -kvm -tr http://timestamp.digicert.com -td sha256 -ifl FilesToSign.txt | |
| - name: Generate artifact templates | |
| id: exports | |
| shell: powershell | |
| run: | | |
| & (Import-Module -Name .\src\PSAppDeployToolkit.Build -PassThru) { Invoke-ADTCustomModuleBuild -Actions 'Export-ADTScriptTemplate', 'Compress-ADTBuildAssetContent' } | |
| - name: Upload module | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ steps.exports.outputs.ModuleOnly }} | |
| if-no-files-found: error | |
| overwrite: true | |
| archive: false | |
| - name: Upload v3 module template | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ steps.exports.outputs.Template_v3 }} | |
| if-no-files-found: error | |
| overwrite: true | |
| archive: false | |
| - name: Upload v4 module template | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ steps.exports.outputs.Template_v4 }} | |
| if-no-files-found: error | |
| overwrite: true | |
| archive: false | |
| - name: Upload pester results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: .\src\Artifacts\TestOutput\PesterTests.xml | |
| if-no-files-found: error | |
| overwrite: true | |
| archive: false | |
| - name: Upload code coverage results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: .\src\Artifacts\CodeCoverage\CodeCoverage.xml | |
| if-no-files-found: error | |
| overwrite: true | |
| archive: false | |
| - name: Generate docs and update website | |
| if: github.ref == 'refs/heads/main' | |
| shell: powershell | |
| env: | |
| API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
| run: | | |
| & (Import-Module -Name .\src\PSAppDeployToolkit.Build -PassThru) { Invoke-ADTCustomModuleBuild -Actions 'Import-ADTReleaseModule', 'Invoke-ADTMarkdownExport', 'Invoke-ADTDocusaurusExport', 'Publish-ADTDocusaurusExport' } |