diff --git a/.github/workflows/README.md b/.github/workflows/README.md index e675f975df..4982b92701 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 @@ -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`) 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..4edca3343e 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,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 @@ -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