Add height splits, 4:3 all variants, download section #1
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: Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ 'Beta.*', 'v*' ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Test | |
| run: dotnet test -c Release --no-build --verbosity normal | |
| - name: Publish (framework-dependent) | |
| run: dotnet publish -c Release -r win-x64 --no-self-contained -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=false -o ./artifacts/framework-dependent | |
| - name: Publish (self-contained) | |
| run: dotnet publish -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o ./artifacts/self-contained | |
| - name: Upload framework-dependent artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ScreenGrid-framework-dependent | |
| path: artifacts/framework-dependent/ScreenGrid.exe | |
| - name: Upload self-contained artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ScreenGrid-self-contained | |
| path: artifacts/self-contained/ScreenGrid.exe | |
| # Rolling pre-release on every push to main | |
| latest-release: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ScreenGrid-framework-dependent | |
| path: ./framework-dependent | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ScreenGrid-self-contained | |
| path: ./self-contained | |
| - name: Rename artifacts | |
| run: | | |
| mv ./framework-dependent/ScreenGrid.exe ./ScreenGrid-small.exe | |
| mv ./self-contained/ScreenGrid.exe ./ScreenGrid-standalone.exe | |
| - name: Create/Update rolling release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest | |
| name: Latest Build | |
| body: | | |
| **Automated build from `main`** | |
| | File | Size | Requires .NET? | | |
| |------|------|----------------| | |
| | `ScreenGrid-small.exe` | ~200 KB | Yes (.NET 9) | | |
| | `ScreenGrid-standalone.exe` | ~70 MB | No | | |
| files: | | |
| ScreenGrid-small.exe | |
| ScreenGrid-standalone.exe | |
| prerelease: true | |
| make_latest: true | |
| # Versioned release on tag push (e.g. Beta.1.0, v1.0.0) | |
| versioned-release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ScreenGrid-framework-dependent | |
| path: ./framework-dependent | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ScreenGrid-self-contained | |
| path: ./self-contained | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Rename artifacts | |
| run: | | |
| mv ./framework-dependent/ScreenGrid.exe ./ScreenGrid-small.exe | |
| mv ./self-contained/ScreenGrid.exe ./ScreenGrid-standalone.exe | |
| - name: Create versioned release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ScreenGrid ${{ steps.version.outputs.VERSION }} | |
| body: | | |
| ## ScreenGrid ${{ steps.version.outputs.VERSION }} | |
| ### Downloads | |
| | File | Size | Requires .NET? | | |
| |------|------|----------------| | |
| | `ScreenGrid-small.exe` | ~200 KB | Yes (.NET 9 Desktop Runtime) | | |
| | `ScreenGrid-standalone.exe` | ~70 MB | No | | |
| ### What's New | |
| See the [commit history](https://github.com/${{ github.repository }}/commits/${{ github.ref_name }}) for changes. | |
| files: | | |
| ScreenGrid-small.exe | |
| ScreenGrid-standalone.exe | |
| prerelease: ${{ startsWith(github.ref_name, 'Beta') }} | |
| make_latest: ${{ !startsWith(github.ref_name, 'Beta') }} |