2025.7.1 - Updated Yubico SDK et al #10
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 Release Zip | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| buildAndUploadModule: | |
| name: Build and Upload module | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: '8.x.x' # Specify the .NET version you're using | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Update XML File with version from GitHub | |
| run: | | |
| pwsh -Command ' | |
| [xml]$xml = Get-Content "./Module/powershellYK.csproj" | |
| Write-Host $xml.Project.PropertyGroup[0].AssemblyVersion | |
| $xml.Project.PropertyGroup[0].AssemblyVersion = "${{ github.event.release.tag_name }}" | |
| Write-Host $xml.Project.PropertyGroup[0].AssemblyVersion | |
| $xml.Save("./Module/powershellYK.csproj") | |
| ' | |
| - name: Install platyPS | |
| run: | | |
| pwsh -Command ' | |
| Install-PSResource -Name platyPS -TrustRepository:$true | |
| ' | |
| - name: Build | |
| run: dotnet build --no-restore -c Release Module/powershellYK.csproj --output release | |
| - name: Replace version in the module file | |
| run: | | |
| sed -i "s/ModuleVersion.*/ModuleVersion = '${{ github.event.release.tag_name }}'/" release/powershellYK.psd1 | |
| - name: Build MAML XML Help | |
| run: | | |
| pwsh -Command ' | |
| New-ExternalHelp -Path './Docs/Commands' -OutputPath ./release -Force | |
| ' | |
| - name: Zip release folder | |
| working-directory: release | |
| run: zip -r ../release.zip * | |
| - name: Upload Release Assets | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: release.zip | |
| asset_name: powershellYK_${{ github.event.release.tag_name }}.zip | |
| asset_content_type: application/zip |