Add NuGet package configuration and publishing workflow#11
Add NuGet package configuration and publishing workflow#11TheItsNameless wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds automated NuGet publishing workflows and enhances package metadata to support publishing the HPort library and CLI tool as NuGet packages. The changes enable automated releases through GitHub Actions, address issues #3, #6, and #7, and improve project tracking through updated issue templates and documentation.
Changes:
- Added automated GitHub Actions workflow for publishing packages to NuGet.org and GitHub Packages
- Enhanced NuGet package metadata in both project files including licensing, descriptions, and README inclusion
- Updated issue templates with project tracking fields for better organization
- Added repository details to AGENTS.md documentation and updated .gemini/settings.json configuration
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/publish.yml |
New workflow that builds and publishes NuGet packages on release |
src/ItsNameless.HPort/ItsNameless.HPort.csproj |
Added NuGet package metadata and README inclusion for library package |
src/ItsNameless.HPortCli/ItsNameless.HPortCli.csproj |
Added NuGet package metadata, CLI tool configuration, and README inclusion |
.github/ISSUE_TEMPLATE/bug_report.yml |
Added project tracking and type fields |
.github/ISSUE_TEMPLATE/feature_request.yml |
Added project tracking and type fields |
.github/ISSUE_TEMPLATE/security_vulnerability.yml |
Added type field |
AGENTS.md |
Added repository details section with owner and GitHub URL |
.gemini/settings.json |
Added defaultApprovalMode setting and reformatted JSON structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Restore dependencies | ||
| run: dotnet restore | ||
|
|
||
| - name: Build and Pack | ||
| run: | | ||
| VERSION="${GITHUB_REF_NAME#v}" | ||
| echo "Packing version: $VERSION" | ||
| dotnet pack --configuration Release /p:Version=$VERSION --output ./nupkg |
There was a problem hiding this comment.
The publish workflow does not run tests before building and publishing packages. Since the repository has comprehensive test coverage (as indicated by test projects in the test/ directory), it's a best practice to run tests before publishing to ensure that broken code is not released. Consider adding a test step after restoring dependencies and before building/packing, such as: "dotnet test --configuration Release".
| title: "[BUG] " | ||
| labels: ["bug"] | ||
| projects: ["TheItsProjects/6"] | ||
| type: Bug |
There was a problem hiding this comment.
The "type" field is not a valid GitHub issue template configuration option. GitHub issue templates only support the following root-level fields: name, description, title, labels, assignees, and projects. This field should be removed as it will be ignored by GitHub and may cause confusion.
| type: Bug |
| title: "[FEATURE] " | ||
| labels: ["enhancement"] | ||
| projects: ["TheItsProjects/6"] | ||
| type: Feature |
There was a problem hiding this comment.
The "type" field is not a valid GitHub issue template configuration option. GitHub issue templates only support the following root-level fields: name, description, title, labels, assignees, and projects. This field should be removed as it will be ignored by GitHub and may cause confusion.
| type: Feature |
| description: Show us a security vulnerability you have found | ||
| title: "[SECURITY] " | ||
| labels: ["security"] | ||
| type: Security |
There was a problem hiding this comment.
The "type" field is not a valid GitHub issue template configuration option. GitHub issue templates only support the following root-level fields: name, description, title, labels, assignees, and projects. This field should be removed as it will be ignored by GitHub and may cause confusion.
| type: Security |
| run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate | ||
|
|
||
| - name: Push to GitHub Packages | ||
| run: dotnet nuget push ./nupkg/*.nupkg --source https://nuget.pkg.github.com/TheItsProjects/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |
There was a problem hiding this comment.
The organization name casing in the GitHub Packages URL is inconsistent with existing repository references. The existing config.yml file uses "theitsprojects" (lowercase) in URLs, and the csproj files also use "theitsprojects" (lowercase). GitHub Packages URLs are case-sensitive and must match the exact organization name. Verify the correct organization name casing and update this URL to match. If the organization is "theitsprojects", this should be "https://nuget.pkg.github.com/theitsprojects/index.json".
| run: dotnet nuget push ./nupkg/*.nupkg --source https://nuget.pkg.github.com/TheItsProjects/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | |
| run: dotnet nuget push ./nupkg/*.nupkg --source https://nuget.pkg.github.com/theitsprojects/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |
|
|
||
| - **Repository Name:** HPort | ||
| - **Owner:** TheItsProjects | ||
| - **GitHub URL:** [TheItsProjects/HPort](https://github.com/TheItsProjects/HPort) |
There was a problem hiding this comment.
The GitHub URL uses mixed case "TheItsProjects/HPort" which is inconsistent with existing repository URLs in the codebase. The existing config.yml file (line 5, 9, 13) and the csproj files use "theitsprojects/hport" (all lowercase). While GitHub URLs are case-insensitive for browsing, consistency is important for documentation. Consider using "https://github.com/theitsprojects/hport" to match the existing pattern.
| - **GitHub URL:** [TheItsProjects/HPort](https://github.com/TheItsProjects/HPort) | |
| - **GitHub URL:** [theitsprojects/hport](https://github.com/theitsprojects/hport) |
|
@copilot Implement the Suggestions made by copilot reviewer |
|
@TheItsNameless I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you. |
This pull request introduces automated publishing workflows and improves package metadata for both the library and CLI projects. It also enhances issue templates for better project tracking and adds repository details to documentation.
Automated Publishing and Packaging
.github/workflows/publish.ymlworkflow to automate publishing of NuGet packages to NuGet.org and GitHub Packages upon release.ItsNameless.HPort.csprojandItsNameless.HPortCli.csprojto include detailed NuGet package metadata (such asPackageId,Authors,Description, tags, license, repository URLs, and README inclusion). The CLI project is now configured as a .NET tool withPackAsToolandToolCommandName. [1] [2]README.mdin their NuGet packages for improved documentation. [1] [2]Issue Template Enhancements
Documentation Update
AGENTS.mdfor better project context.Configuration Update
"defaultApprovalMode": "plan"in.gemini/settings.jsonfor improved workflow configuration.Related Issues