v0.1.2: bump checkpoint retention 30 -> 90 #3
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to build (e.g. 0.1.0). Defaults to Directory.Build.props.' | |
| required: false | |
| jobs: | |
| build-installer: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write # needed to create releases / upload assets | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Resolve version | |
| id: ver | |
| shell: pwsh | |
| run: | | |
| if ('${{ github.event_name }}' -eq 'push') { | |
| $v = '${{ github.ref_name }}'.TrimStart('v') | |
| } elseif ('${{ inputs.version }}') { | |
| $v = '${{ inputs.version }}' | |
| } else { | |
| [xml]$p = Get-Content Directory.Build.props | |
| $v = $p.Project.PropertyGroup.Version | |
| } | |
| "version=$v" | Out-File $env:GITHUB_OUTPUT -Append | |
| Write-Host "Building version $v" | |
| - name: Restore + test | |
| run: | | |
| dotnet restore WebhookServer.sln | |
| dotnet test WebhookServer.sln -c Release | |
| - name: Install Inno Setup | |
| shell: pwsh | |
| run: | | |
| choco install innosetup --no-progress -y | |
| Write-Host "ISCC at: $((Get-Command iscc).Path)" | |
| - name: Build installer | |
| shell: pwsh | |
| run: ./scripts/build-installer.ps1 -VersionOverride ${{ steps.ver.outputs.version }} | |
| - name: Upload installer artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WebhookServer-Setup-${{ steps.ver.outputs.version }} | |
| path: dist/WebhookServer-Setup-*.exe | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Webhook Server ${{ steps.ver.outputs.version }} | |
| tag_name: ${{ github.ref_name }} | |
| draft: false | |
| prerelease: ${{ startsWith(steps.ver.outputs.version, '0.') }} | |
| files: dist/WebhookServer-Setup-*.exe | |
| generate_release_notes: true |