Skip to content

Comments

Add NuGet package configuration and publishing workflow#11

Open
TheItsNameless wants to merge 1 commit intomainfrom
feature/nuget-package
Open

Add NuGet package configuration and publishing workflow#11
TheItsNameless wants to merge 1 commit intomainfrom
feature/nuget-package

Conversation

@TheItsNameless
Copy link
Contributor

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

  • Added .github/workflows/publish.yml workflow to automate publishing of NuGet packages to NuGet.org and GitHub Packages upon release.
  • Updated ItsNameless.HPort.csproj and ItsNameless.HPortCli.csproj to include detailed NuGet package metadata (such as PackageId, Authors, Description, tags, license, repository URLs, and README inclusion). The CLI project is now configured as a .NET tool with PackAsTool and ToolCommandName. [1] [2]
  • Both projects now include the root README.md in their NuGet packages for improved documentation. [1] [2]

Issue Template Enhancements

  • Updated issue templates to include project tracking and type fields, improving triage and assignment for bug reports, feature requests, and security vulnerabilities. [1] [2] [3]

Documentation Update

  • Added repository details (name, owner, and GitHub URL) to AGENTS.md for better project context.

Configuration Update

  • Set "defaultApprovalMode": "plan" in .gemini/settings.json for improved workflow configuration.

Related Issues

Copilot AI review requested due to automatic review settings February 22, 2026 11:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +24 to +31
- 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
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Copilot uses AI. Check for mistakes.
title: "[BUG] "
labels: ["bug"]
projects: ["TheItsProjects/6"]
type: Bug
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
type: Bug

Copilot uses AI. Check for mistakes.
title: "[FEATURE] "
labels: ["enhancement"]
projects: ["TheItsProjects/6"]
type: Feature
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
type: Feature

Copilot uses AI. Check for mistakes.
description: Show us a security vulnerability you have found
title: "[SECURITY] "
labels: ["security"]
type: Security
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
type: Security

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Suggested change
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

Copilot uses AI. Check for mistakes.

- **Repository Name:** HPort
- **Owner:** TheItsProjects
- **GitHub URL:** [TheItsProjects/HPort](https://github.com/TheItsProjects/HPort)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **GitHub URL:** [TheItsProjects/HPort](https://github.com/TheItsProjects/HPort)
- **GitHub URL:** [theitsprojects/hport](https://github.com/theitsprojects/hport)

Copilot uses AI. Check for mistakes.
@TheItsNameless
Copy link
Contributor Author

@copilot Implement the Suggestions made by copilot reviewer

Copy link

Copilot AI commented Feb 22, 2026

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Publish HPort.Cli as a command line tool [FEATURE] Release workflow [FEATURE] Publish HPort as Nuget Package

2 participants