feat: enforce single instance with named mutex (#1) #8
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: CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| tags: ['v*'] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # MinVer needs full history for version calculation | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Build | |
| run: dotnet build -c Release | |
| - name: Publish | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: dotnet publish src/PayBeat.App/PayBeat.App.csproj -c Release -r win-x64 --no-self-contained -o publish/ | |
| - name: Zip artifact | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}" | |
| $zipName = "PayBeat-$version-win-x64.zip" | |
| Compress-Archive -Path "publish/*" -DestinationPath $zipName | |
| echo "ZIP_NAME=$zipName" >> $env:GITHUB_ENV | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ env.ZIP_NAME }} | |
| generate_release_notes: true |