Action-Test - [🚀 [Feature]: Module manifests now stamped with the resolved version at build time #136] by @MariusStorhaug #999
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: Action-Test | |
| run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| ActionTestDefault: | |
| name: Action-Test - [Default] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| with: | |
| Name: PSModuleTest | |
| Version: 1.0.0 | |
| ArtifactName: PSModuleTestDefault | |
| WorkingDirectory: tests/srcTestRepo | |
| - name: Verify manifest | |
| shell: pwsh | |
| run: | | |
| $manifest = Import-PowerShellDataFile 'tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | |
| if ($manifest.ModuleVersion -ne '1.0.0') { | |
| throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'" | |
| } | |
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" | |
| ActionTestMinimal: | |
| name: Action-Test - [Minimal] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| with: | |
| Name: PSModuleTest | |
| Version: 1.0.0 | |
| ArtifactName: PSModuleTestMinimal | |
| WorkingDirectory: tests/srcMinimalTestRepo | |
| - name: Verify manifest | |
| shell: pwsh | |
| run: | | |
| $manifest = Import-PowerShellDataFile 'tests/srcMinimalTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | |
| if ($manifest.ModuleVersion -ne '1.0.0') { | |
| throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'" | |
| } | |
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" | |
| ActionTestPrerelease: | |
| name: Action-Test - [Prerelease] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| with: | |
| Name: PSModuleTest | |
| Version: 2.0.0 | |
| Prerelease: alpha001 | |
| ArtifactName: PSModuleTestPrerelease | |
| WorkingDirectory: tests/srcTestRepo | |
| - name: Verify manifest | |
| shell: pwsh | |
| run: | | |
| $manifest = Import-PowerShellDataFile 'tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | |
| if ($manifest.ModuleVersion -ne '2.0.0') { | |
| throw "Expected ModuleVersion '2.0.0' but got '$($manifest.ModuleVersion)'" | |
| } | |
| $prerelease = $manifest.PrivateData.PSData.Prerelease | |
| if ($prerelease -ne 'alpha001') { | |
| throw "Expected Prerelease 'alpha001' but got '$prerelease'" | |
| } | |
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" | |
| Write-Host "Prerelease: $prerelease" | |
| ActionTestWithManifest: | |
| name: Action-Test - [DefaultWithManifest] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Action-Test | |
| uses: ./ | |
| with: | |
| Name: PSModuleTest | |
| Version: 1.0.0 | |
| ArtifactName: PSModuleTestWithManifest | |
| WorkingDirectory: tests/srcWithManifestTestRepo | |
| - name: Verify manifest | |
| shell: pwsh | |
| run: | | |
| $manifest = Import-PowerShellDataFile 'tests/srcWithManifestTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | |
| if ($manifest.ModuleVersion -ne '1.0.0') { | |
| throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'" | |
| } | |
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" |