Merge pull request #35 from Litenova-Solutions/release/4.4.0 #19
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 a version tag, build self-contained binaries and publish a GitHub Release | |
| # carrying: the Windows installer (Inno Setup), a portable win-x64 zip, a | |
| # linux-x64 tarball, and a SHA256SUMS file. The portable archives and their | |
| # checksums are what the Scoop manifest and Homebrew formula consume. | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| windows: | |
| name: Build Windows (win-x64) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Verify version and read from codebase | |
| id: version | |
| shell: pwsh | |
| run: | | |
| ./build/verify-version.ps1 -Tag "${{ github.ref_name }}" | |
| $version = ([xml](Get-Content Directory.Build.props)).Project.PropertyGroup.Version | | |
| Where-Object { $_ } | Select-Object -First 1 | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Publish self-contained win-x64 | |
| shell: pwsh | |
| run: | | |
| dotnet publish src/Host/Fuse.Cli/Fuse.Cli.csproj ` | |
| --configuration Release ` | |
| /p:PublishProfile=runtime-win-x64 ` | |
| /p:Version=${{ steps.version.outputs.VERSION }} | |
| - name: Package portable zip | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path dist -Force | Out-Null | |
| Compress-Archive -Path artifacts/runtime/win-x64/fuse.exe ` | |
| -DestinationPath "dist/fuse-${{ steps.version.outputs.VERSION }}-win-x64.zip" -Force | |
| - name: Stage installer binary | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path publish/win-x64 -Force | Out-Null | |
| Copy-Item artifacts/runtime/win-x64/fuse.exe publish/win-x64/fuse.exe -Force | |
| - name: Build installer with Inno Setup | |
| shell: pwsh | |
| run: | | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" ` | |
| /DMyAppVersion=${{ steps.version.outputs.VERSION }} ` | |
| installer/fuse.iss | |
| Copy-Item "publish/installer/fuse-${{ steps.version.outputs.VERSION }}-setup.exe" dist/ -Force | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows | |
| path: dist/* | |
| linux: | |
| name: Build Linux (linux-x64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Install Linux publish prerequisites | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang zlib1g-dev | |
| - name: Verify version and read from codebase | |
| id: version | |
| shell: pwsh | |
| run: | | |
| ./build/verify-version.ps1 -Tag "${{ github.ref_name }}" | |
| $version = ([xml](Get-Content Directory.Build.props)).Project.PropertyGroup.Version | | |
| Where-Object { $_ } | Select-Object -First 1 | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Publish self-contained linux-x64 | |
| run: | | |
| dotnet publish src/Host/Fuse.Cli/Fuse.Cli.csproj \ | |
| --configuration Release \ | |
| /p:PublishProfile=runtime-linux-x64 \ | |
| /p:Version=${{ steps.version.outputs.VERSION }} | |
| - name: Package tarball | |
| run: | | |
| mkdir -p dist | |
| tar -czf "dist/fuse-${{ steps.version.outputs.VERSION }}-linux-x64.tar.gz" \ | |
| -C artifacts/runtime/linux-x64 fuse | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux | |
| path: dist/* | |
| release: | |
| name: Publish GitHub Release | |
| needs: [windows, linux] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Generate SHA256SUMS | |
| working-directory: dist | |
| run: sha256sum * > SHA256SUMS.txt | |
| - name: Create GitHub Release and upload assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Fuse ${{ github.ref_name }} | |
| draft: false | |
| prerelease: ${{ contains(github.ref_name, '-') }} | |
| generate_release_notes: true | |
| files: dist/* |