From 1b6316443b866eecc676144efe52b2a40c925f44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 20:02:04 +0000 Subject: [PATCH 1/3] Initial plan From ee18ad147b601daa23162237f51cebd9b5e9baae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 20:07:14 +0000 Subject: [PATCH 2/3] Publish Terminal.Gui.Interop.Spectre package --- .github/workflows/README.md | 4 ++-- .github/workflows/build-validation.yml | 3 +++ .github/workflows/publish.yml | 13 +++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index e675f975df..be052f629c 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -15,7 +15,7 @@ The repository uses multiple GitHub Actions workflows. What runs and when: - `dotnet restore` - Build Debug: `dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612` - Build Release (library): `dotnet build Terminal.Gui/Terminal.Gui.csproj --configuration Release --no-incremental --force -property:NoWarn=0618%3B0612` -- Pack Release: `dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612` +- Pack Release packages: `dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612` and `dotnet pack Terminal.Gui.Interop.Spectre/Terminal.Gui.Interop.Spectre.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612` - Publish `Tests/NativeAotSmoke` with AOT and run `--smoke-test` - Build Release solution @@ -67,7 +67,7 @@ The repository uses multiple GitHub Actions workflows. What runs and when: ### 5) Publish to NuGet (`.github/workflows/publish.yml`) - **Triggers**: push to `main`, `develop`, and tags `v*`(ignores `**.md`) -- Uses GitVersion to compute SemVer, builds Release, packs with symbols, and pushes to NuGet.org using `NUGET_API_KEY` +- Uses GitVersion to compute SemVer, builds Release, packs Terminal.Gui and Terminal.Gui.Interop.Spectre with symbols, and pushes both to NuGet.org using `NUGET_API_KEY` - **Automatically triggered** by the Create Release workflow when a new tag is pushed - **Additional actions on main branch**: - Delists old NuGet packages to keep package list clean: diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index a872cd9477..dc92240988 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -50,6 +50,9 @@ jobs: - name: Pack Release Terminal.Gui run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612 + - name: Pack Release Terminal.Gui.Interop.Spectre + run: dotnet pack Terminal.Gui.Interop.Spectre/Terminal.Gui.Interop.Spectre.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612 + - name: AOT Publish Test App (catches trimming and reflection errors) run: dotnet publish ./Tests/NativeAotSmoke/NativeAotSmoke.csproj --configuration Release --output ./aot-publish -property:NoWarn=0618%3B0612 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 51ff221a77..453f5044cb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,9 @@ on: paths-ignore: - '**.md' +permissions: + contents: read + jobs: publish: name: Build and Publish to Nuget.org @@ -41,12 +44,15 @@ jobs: dotnet-version: 10.x dotnet-quality: 'ga' - - name: Build Release Terminal.Gui - run: dotnet build Terminal.Gui/Terminal.Gui.csproj --no-incremental --nologo --force --configuration Release + - name: Build Release Terminal.Gui packages + run: dotnet build Terminal.Gui.Interop.Spectre/Terminal.Gui.Interop.Spectre.csproj --no-incremental --nologo --force --configuration Release - name: Pack Release Terminal.Gui ${{ steps.gitversion.outputs.SemVer }} for Nuget run: dotnet pack Terminal.Gui/Terminal.Gui.csproj -c Release --include-symbols --no-build + - name: Pack Release Terminal.Gui.Interop.Spectre ${{ steps.gitversion.outputs.SemVer }} for Nuget + run: dotnet pack Terminal.Gui.Interop.Spectre/Terminal.Gui.Interop.Spectre.csproj -c Release --include-symbols --no-build + # - name: Test to generate Code Coverage Report # run: | # sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json @@ -72,6 +78,9 @@ jobs: - name: Publish Terminal.Gui.${{ steps.gitversion.outputs.SemVer }} to NuGet.org run: dotnet nuget push Terminal.Gui/bin/Release/Terminal.Gui.${{ steps.gitversion.outputs.SemVer }}.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} + - name: Publish Terminal.Gui.Interop.Spectre.${{ steps.gitversion.outputs.SemVer }} to NuGet.org + run: dotnet nuget push Terminal.Gui.Interop.Spectre/bin/Release/Terminal.Gui.Interop.Spectre.${{ steps.gitversion.outputs.SemVer }}.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} + # Deterministic version handoff to notify-clet.yml. Avoids the NuGet # search-API indexing lag that caused gui-cs/clet to skip TG develop.37 # (see clet workflow run 25406348354). notify-clet.yml downloads this From 7545ce2198a9d56f67b1c33a8adf9271ad2d230c Mon Sep 17 00:00:00 2001 From: Tig Date: Tue, 26 May 2026 14:41:43 -0600 Subject: [PATCH 3/3] Fix publish workflow: build both projects before packing - Build Terminal.Gui.csproj in addition to Terminal.Gui.Interop.Spectre so that 'dotnet pack --no-build' succeeds for both packages - Fix README trigger docs to match actual workflow (develop + tags, not main) - Correct 'Additional actions' section to reflect tag-based triggers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/README.md | 9 +++------ .github/workflows/publish.yml | 4 +++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index be052f629c..4982b92701 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -66,14 +66,11 @@ The repository uses multiple GitHub Actions workflows. What runs and when: ### 5) Publish to NuGet (`.github/workflows/publish.yml`) -- **Triggers**: push to `main`, `develop`, and tags `v*`(ignores `**.md`) +- **Triggers**: push to `develop` and tags `v*` (ignores `**.md`) - Uses GitVersion to compute SemVer, builds Release, packs Terminal.Gui and Terminal.Gui.Interop.Spectre with symbols, and pushes both to NuGet.org using `NUGET_API_KEY` - **Automatically triggered** by the Create Release workflow when a new tag is pushed -- **Additional actions on main branch**: - - Delists old NuGet packages to keep package list clean: - - Keeps only the most recent `*-develop.*` package - - Keeps only the just-published `*-beta.*` or `*-rc.*` package - - Triggers Terminal.Gui.templates repository update via repository_dispatch (requires `PAT_FOR_TEMPLATES` secret) +- **Additional actions on tag push** (`v*`): + - Triggers Terminal.Gui.templates repository update via repository_dispatch (requires `TEMPLATE_REPO_TOKEN` secret) ### 6) Build and publish API docs (`.github/workflows/api-docs.yml`) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 453f5044cb..4edca3343e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,9 @@ jobs: dotnet-quality: 'ga' - name: Build Release Terminal.Gui packages - run: dotnet build Terminal.Gui.Interop.Spectre/Terminal.Gui.Interop.Spectre.csproj --no-incremental --nologo --force --configuration Release + run: | + dotnet build Terminal.Gui/Terminal.Gui.csproj --no-incremental --nologo --force --configuration Release + dotnet build Terminal.Gui.Interop.Spectre/Terminal.Gui.Interop.Spectre.csproj --no-incremental --nologo --force --configuration Release - name: Pack Release Terminal.Gui ${{ steps.gitversion.outputs.SemVer }} for Nuget run: dotnet pack Terminal.Gui/Terminal.Gui.csproj -c Release --include-symbols --no-build