update icon #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*.*.*' | |
| permissions: | |
| contents: write | |
| env: | |
| DOTNET_VERSION: '8.0.x' | |
| PROJECT_PATH: 'src/SendSpinClient/SendSpinClient.csproj' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| $version = "${{ github.ref_name }}".TrimStart('v') | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| echo "Version: $version" | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ env.PROJECT_PATH }} | |
| - name: Build Release | |
| run: dotnet build ${{ env.PROJECT_PATH }} -c Release --no-restore | |
| - name: Publish win-x64 | |
| run: | | |
| dotnet publish ${{ env.PROJECT_PATH }} -c Release -r win-x64 --self-contained false -o src/SendSpinClient/bin/publish/win-x64 | |
| - name: Create dist directory | |
| run: New-Item -ItemType Directory -Force -Path dist | |
| - name: Install Inno Setup | |
| run: choco install innosetup -y | |
| - name: Build Installer | |
| run: | | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ steps.version.outputs.VERSION }} installer/SendSpinClient.iss | |
| # List output to verify | |
| Get-ChildItem -Path dist -Recurse | |
| - name: Create portable ZIP | |
| run: Compress-Archive -Path src/SendSpinClient/bin/publish/win-x64/* -DestinationPath dist/SendSpinClient-${{ steps.version.outputs.VERSION }}-portable-win-x64.zip | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: SendSpin ${{ steps.version.outputs.VERSION }} | |
| draft: false | |
| prerelease: ${{ contains(github.ref_name, '-') }} | |
| generate_release_notes: true | |
| files: | | |
| dist/SendSpinClient-${{ steps.version.outputs.VERSION }}-Setup.exe | |
| dist/SendSpinClient-${{ steps.version.outputs.VERSION }}-portable-win-x64.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |