fix screenshot #2 #72
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: "Tag Release" | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Push events to every tag not containing / | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Restore NuGet packages | |
| run: dotnet restore | |
| - name: Clean build directories | |
| run: dotnet clean --configuration Release | |
| - name: Run tests | |
| run: dotnet test --configuration Release --no-restore --verbosity normal # Run tests | |
| - name: Build project | |
| run: dotnet publish ${{ github.event.repository.name }} --configuration Release --no-restore --framework net8.0-windows --maxcpucount:1 # Build the app in Release mode | |
| - name: Create artifacts directory | |
| shell: pwsh | |
| run: New-Item -ItemType Directory -Force -Path artifacts | Out-Null | |
| - name: Zip artifacts with PowerShell script | |
| shell: pwsh # Use PowerShell as the shell | |
| run: | | |
| # Zip the output files with the assembly name and version | |
| Compress-Archive -Path ${{ github.workspace }}\${{ github.event.repository.name }}\bin\Release\net8.0-windows\publish\* -DestinationPath ${{ github.workspace }}\artifacts\${{ github.event.repository.name }}-${{ github.ref_name }}.zip | |
| - name: Create Release | |
| id: create_release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "artifacts/*" | |
| omitBody: true | |
| makeLatest: true | |
| generateReleaseNotes: true |