Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In NuGet publish workflow, restrict valid versions to vM.N.O or vM.N.O-alpha.X.[issue-code] (OSOE-536) #187

Closed
0liver opened this issue Jan 16, 2023 · 8 comments · Fixed by #208
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@0liver
Copy link
Contributor

0liver commented Jan 16, 2023

Jira issue

@0liver 0liver added the good first issue Good for newcomers label Jan 16, 2023
@github-actions github-actions bot changed the title In NuGet publish workflow, restrict valid versions to vM.N.O or v.M.N.O-alpha.X.[issue-code] In NuGet publish workflow, restrict valid versions to vM.N.O or v.M.N.O-alpha.X.[issue-code] (OSOE-536) Jan 16, 2023
@BenedekFarkas
Copy link
Member

BenedekFarkas commented Jan 16, 2023

Related: #70

This is kind of a duplicate, but not exactly, because generating the version number is (and should be) optional, because this pattern doesn't fit a production release number.

@0liver
Copy link
Contributor Author

0liver commented Jan 16, 2023

Kind of, yes. But typos in version number keep happening and they sometimes break the upgrade process of freshly versioned packages, because the mistyped version keeps appearing at the top, for example, when actually a newer one exists.

@0liver
Copy link
Contributor Author

0liver commented Feb 8, 2023

This happened again now: https://github.com/Lombiq/Orchard-Privacy/pull/50/files#diff-0cb3d0d3e8c6b5787f70f48b2d467b21fc55ef86f64fb8a3d13398f414a8271aR54.

I think it would be really easy to add a regex check to the version number for the time being, before someone will tackle and solve the much harder issue #70.

@Piedone Piedone added the enhancement New feature or request label Feb 9, 2023
@adelgeiszt adelgeiszt self-assigned this Feb 10, 2023
@adelgeiszt
Copy link
Contributor

@0liver, if the regex check's result is false, so the version number is incorrect, should the action just simply exit or what's the expected behavior?

@0liver
Copy link
Contributor Author

0liver commented Feb 13, 2023

It should error out so that the responsible developer can fix the version. Best would be to add the expected format to the error message right away.

@adelgeiszt
Copy link
Contributor

Thank you.

@adelgeiszt
Copy link
Contributor

@0liver I already tested my code locally, but is it possible to test the workflow with the new condition somewhere?

@0liver
Copy link
Contributor Author

0liver commented Feb 13, 2023

You can use any of the NuGet-published modules in OSOCE to push new tags out which will generate new versions of a package, e.g. Node.js Extensions. Simply create a new tag at a commit and push that to GitHub.

You'll have to point the repo's publish workflow at this issue's branch, of course.

@sarahelsaig sarahelsaig changed the title In NuGet publish workflow, restrict valid versions to vM.N.O or v.M.N.O-alpha.X.[issue-code] (OSOE-536) In NuGet publish workflow, restrict valid versions to vM.N.O or vM.N.O-alpha.X.[issue-code] (OSOE-536) Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
4 participants