Files
Terminal.Gui/.github/workflows/build-release.yml
BDisp 8fef16d35f Fixes #4116. NativeAot and SelfContained projects aren't working well in release mode (#4117)
* Fixes #4116. NativeAot and SelfContained projects aren't working well in release mode

* Revert delete nuget package because it fail in the git actions

* Trying automatize the nuget package installation

* Fixing UserProfile

* Trying fix push package for Unix OS

* Still triying to push nuget to the Unix

* Trying delete nuget package in the Pack target

* Trying fix git actions for release build

* Fix projects path

* Still fixing restore

* Add restore force parameter

* Build NativeAot and SelfContained projects before solution

* Build solution without restore

* Restore solutions packages before build

* Call dotnet restore before build the AOT and self-contained projects

* Remove unneeded run

* Revert "Remove unneeded run"

This reverts commit e04498d1ce.

* Trying fix racing fail unit tests

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2025-06-04 12:23:44 -06:00

48 lines
1.4 KiB
YAML

name: Ensure that Release Build of Solution Builds Correctly
on:
push:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'
pull_request:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'
jobs:
build_release:
# Ensure that RELEASE builds are not broken
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref_name }}
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: Build Release Terminal.Gui
run: dotnet build Terminal.Gui/Terminal.Gui.csproj --no-incremental --nologo --force --configuration Release
- name: Pack Release Terminal.Gui
run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages
- name: Restore AOT and Self-Contained projects
run: |
dotnet restore ./Examples/NativeAot/NativeAot.csproj -f
dotnet restore ./Examples/SelfContained/SelfContained.csproj -f
- name: Restore Solution Packages
run: dotnet restore
- name: Build Release AOT and Self-Contained
run: |
dotnet build ./Examples/NativeAot/NativeAot.csproj --configuration Release
dotnet build ./Examples/SelfContained/SelfContained.csproj --configuration Release
- name: Build Release Solution without restore
run: dotnet build --configuration Release --no-restore