Skip to content

[gh-actions] publishing nuget package on release#117

Merged
StefH merged 3 commits intojmespath-community:mainfrom
springcomp:feature/publish-nuget
Mar 4, 2026
Merged

[gh-actions] publishing nuget package on release#117
StefH merged 3 commits intojmespath-community:mainfrom
springcomp:feature/publish-nuget

Conversation

@springcomp
Copy link
Collaborator

@springcomp springcomp commented Mar 1, 2026

Fixes #114.

This PR adds a new publish.yaml workflow that triggers on new releases.
The release MUST be associated with a tag having the following format v<M.m.n> (version number).

How it works

  • The C# assemblies have a strong-name key which is encrypted and can only be decrypted by the publish.yaml workflow using the SN_PASSPHRASE, SN_SALT and SN_INIT repository secrets. That makes sure the resulting assemblies have the official JMESPath Community "identity" (kindly transferred from @jdevillard).
  • In Debug mode, (PR) the strong-name key which is available in the repository is for test puposes only and never published to NuGet.

The resulting package is published to NuGet.org.

Note: this PR is a draft, pending:

@springcomp springcomp force-pushed the feature/publish-nuget branch from eb4b43b to c2537ff Compare March 2, 2026 10:42
@springcomp springcomp requested a review from StefH March 2, 2026 10:42
@springcomp
Copy link
Collaborator Author

@StefH this is an initial workflow to publish NuGet packages from Release tags.

I have made extensive tests in a personal repository and hopefully there are no (or very few) bugs.
I cannot make any promises, though.

Please, review and merge.

Once that works, a new release to the project with name v<VERSION> where <VERSION> looks like M.n.p will trigger a new workflow and publish a new version of the package. I suggest starting next version from v1.0.400.

@springcomp springcomp requested a review from StefH March 2, 2026 19:46
@StefH
Copy link
Collaborator

StefH commented Mar 3, 2026

@springcomp
Do you know why I cannot merge?

image

@springcomp
Copy link
Collaborator Author

@StefH good catch, sorry!

That was a permission mistake on my part.
You can now merge.

Happy maintaining !

@StefH
Copy link
Collaborator

StefH commented Mar 3, 2026

@springcomp
Can you double check?

image

@springcomp
Copy link
Collaborator Author

@StefH I have remove branch protection on main.

For some reason, I cannot seem to make it work the way I want 🤷‍♂️.
Hope you’ll figure it out 😏

@StefH StefH merged commit 2843add into jmespath-community:main Mar 4, 2026
1 check passed
@StefH
Copy link
Collaborator

StefH commented Mar 4, 2026

@springcomp
Is there any pattern for the versioning?
You propose the next one to be v1.0.400, why the 400?
And why not just v1.1.0 ?

@springcomp
Copy link
Collaborator Author

@StefH we are re-using the same JmesPath.Net package identity whose last version is 1.0.330.

So we need a version number greater than that.
v1.1.0 is fine.

@StefH
Copy link
Collaborator

StefH commented Mar 4, 2026

@springcomp
Did you fill in the secrets in GitHub?

Because I see an error while building the release?

@springcomp springcomp deleted the feature/publish-nuget branch March 4, 2026 18:14
@springcomp
Copy link
Collaborator Author

@StefH sorry for that 😥

I’ll work with @jdevillard to understand and fix the issue.
Please bear with us.

@springcomp
Copy link
Collaborator Author

@StefH damned ! The PowerShell script was so flaky.

Anyway, this is solved now.
Sorry for that.

I moved the tag and re-created the release and successfully published the new package.

I always forget how painful it is to troubleshoot YAML ci/cd pipelines 😥.

Thanks for bearing with me.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider refactoring the CI / CD

2 participants