-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci: snapshot publish workflow #5
Conversation
(to meet Insee credentials for sonatype account)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for me. Maybe could we improve the pattern for snapshot versions in order to specify different metadata (RC, milestone, ...) ?
|
||
- name: Snapshot version verification | ||
run: | | ||
if ! [[ "${{ steps.version-step.outputs.version }}" =~ ^[0-9]+.[0-9]+.[0-9]+-SNAPSHOT$ ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semver pattern allows richer chains for previous release version or release metadata (https://semver.org/lang/fr/#spec-item-9 and item 10 also). Maybe patterns like ^[0-9]+.[0-9]+.[0-9]+-[0-9A-Za-z-]+$
should be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quite like enforcing "snapshot" since it has a meaning for maven (snapshots have a different overwrite mechanism), and adding other tags introduces some complexity that often feels not necessary
Yet it is restrictive in regards to semver... so we could use the more complex regex.
Isn't the "+" symbol missing for metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose this pattern : (?>^[0-9]+.[0-9]+.[0-9]+-SNAPSHOT$)|(?>^[0-9]+.[0-9]+.[0-9]+-SNAPSHOT\+[0-9A-Za-z-]+$)
it means that the version must match ^[0-9]+.[0-9]+.[0-9]+-SNAPSHOT$
(for example 1.1.1-SNAPSHOT) or must match ^[0-9]+.[0-9]+.[0-9]+-SNAPSHOT\+[0-9A-Za-z-]+$
(for example 1.1.1-SNAPSHOT+feat1). So it is mandatory the version starts with x.y.z-SNAPSHOT and then it may be suffixed by a string wich starts with +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
Maven publishing fails:
I suspect that credentials might be incorrect (maybe extra quotes or something), yet I cannot access InseeFr credentials. A link that may help: https://central.sonatype.org/faq/401-error/ |
👋 Version 1.0.0-SNAPSHOT published on maven central repository |
Add workflow that allow to publish snapshot version (in maven central snapshot repository) in pull requests, when the label
publish-snapshot
is applied.