From 7780a0a775c0a101bd00bd27cce45b5b1eb6b56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Sat, 2 Nov 2024 01:38:40 +0100 Subject: [PATCH] Docs --- Docs/Workflows.md | 1 + .../Productivity/PublishNuGetPackage.md | 1 + .../Productivity/ValidateNugetPublish.md | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 Docs/Workflows/Productivity/ValidateNugetPublish.md diff --git a/Docs/Workflows.md b/Docs/Workflows.md index ee1f7ea8d..09af9031d 100644 --- a/Docs/Workflows.md +++ b/Docs/Workflows.md @@ -29,6 +29,7 @@ These features are designed to reduce resource usage (like paid GitHub Actions m - [Post-pull request checks automation](Workflows/Productivity/PostPullRequestChecksAutomation.md) - [Publish NuGet package](Workflows/Productivity/PublishNuGetPackage.md) - [Spell-checking](Workflows/Productivity/SpellChecking.md) +- [Validate NuGet Publish](Workflows/Productivity/ValidateNugetPublish.md) - [Validate pull request](Workflows/Productivity/ValidatePullRequest.md) - [Validate submodule](Workflows/Productivity/ValidateSubmodule.md) - [YAML linting](Workflows/Productivity/YamlLinting.md) diff --git a/Docs/Workflows/Productivity/PublishNuGetPackage.md b/Docs/Workflows/Productivity/PublishNuGetPackage.md index ae0a4320a..3c73d2316 100644 --- a/Docs/Workflows/Productivity/PublishNuGetPackage.md +++ b/Docs/Workflows/Productivity/PublishNuGetPackage.md @@ -44,3 +44,4 @@ Valid values for `verbosity` are those defined by [MSBuild](https://docs.microso - If you have multiple projects in the repository or if the project you want to build is in a subfolder, then add a solution to the root of the repository that references all projects you want to build. - References to projects (`` elements) not in the repository won't work, these need to be changed to package references (`` elements). Make the conditional based on `$(NuGetBuild)`. See the [Helpful Extensions project file](https://github.com/Lombiq/Helpful-Extensions/blob/dev/Lombiq.HelpfulExtensions/Lombiq.HelpfulExtensions.csproj) for an example. References to projects in the repository will work and those projects, if configured with the proper metadata, will be published together, with dependencies retained among the packages too. +- Also see [`validate-nuget-publish`](ValidateNugetPublish.md) for a workflow that validates the NuGet publishing process without actually pushing the package to NuGet or creating a GitHub release. diff --git a/Docs/Workflows/Productivity/ValidateNugetPublish.md b/Docs/Workflows/Productivity/ValidateNugetPublish.md new file mode 100644 index 000000000..81fd0459e --- /dev/null +++ b/Docs/Workflows/Productivity/ValidateNugetPublish.md @@ -0,0 +1,20 @@ +# Validate NuGet Publish + +Validates the NuGet publishing process without actually pushing the package to NuGet or creating a GitHub release. Useful to check if the project is still publishable, and didn't get an unexpected breaking change. Example validate-nuget-publish.yml_: + +```yaml +name: Validate NuGet Publish + +on: + pull_request: + push: + branches: + - dev + +jobs: + validate-nuget-publish: + name: Validate NuGet Publish + uses: Lombiq/GitHub-Actions/.github/workflows/validate-nuget-publish.yml@dev +``` + +The workflow otherwise takes the same configuration options as [`publish-nuget`](PublishNuGetPackage.md), but doesn't require the `API_KEY` secret.