Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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`)
- Uses GitVersion to compute SemVer, builds Release, packs with symbols, and pushes to NuGet.org using `NUGET_API_KEY`
- **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`)

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths-ignore:
- '**.md'

permissions:
contents: read

jobs:
publish:
name: Build and Publish to Nuget.org
Expand Down Expand Up @@ -41,12 +44,17 @@ 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/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

- 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
Expand All @@ -72,6 +80,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
Expand Down
Loading