PSBinaryModule | Release | 22206760708 #12
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: Release | |
| run-name: "${{ github.event.repository.name }} | Release | ${{ github.run_id }}" | |
| permissions: read-all | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release-type: | |
| description: 'Release type' | |
| required: true | |
| default: 'Release' | |
| type: choice | |
| options: | |
| - Release | |
| - Prerelease | |
| publish-psgallery: | |
| description: 'Publish release to PSGallery' | |
| required: false | |
| type: boolean | |
| default: true | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion tool | |
| uses: gittools/actions/gitversion/setup@2685caa112fc953a61603836655d04cbc57bc2aa | |
| with: | |
| versionSpec: '6.5.1' | |
| - name: Get semantic build version | |
| id: gitversion | |
| uses: gittools/actions/gitversion/execute@2685caa112fc953a61603836655d04cbc57bc2aa | |
| with: | |
| configFilePath: GitVersion.yml | |
| disableShallowCloneCheck: true | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Setup PowerShell | |
| shell: pwsh | |
| run: | | |
| Install-PSResource -Name InvokeBuild, Pester -TrustRepository -AcceptLicense | |
| - name: Build Module | |
| shell: pwsh | |
| run: | | |
| Invoke-Build -Task Build, Test -SemanticVersion ${{ steps.gitversion.outputs.majorMinorPatch }} -Configuration Release | |
| - name: Build Module | |
| id: build | |
| uses: ./.github/actions/ps-build | |
| with: | |
| release-type: ${{ inputs['release-type'] }} | |
| - name: Release Module | |
| uses: ./.github/actions/ps-release | |
| env: | |
| PSGALLERY_API_KEY: ${{ secrets.NUGETAPIKEY_PSGALLERY }} | |
| with: | |
| release-version: ${{ steps.build.outputs.release-version }} | |
| publish-psgallery: ${{ inputs.publish-psgallery }} |