cdxgen icon indicating copy to clipboard operation
cdxgen copied to clipboard

[release] Add the possibility to release pre-releases

Open malice00 opened this issue 7 months ago • 3 comments

It would be good to be able to build pre-releases, eg to test changes to our release-workflow.

@jkowalleck gave us this information to get us started:

For npmjs.org registry, anything not tagged as latest is going to be not auto-installed. For npmjs.org registry, version numbers like 1.2.3-alpha.0 are treated as prereleases. For dockerhub registry, version numbers like 1.2.3-alpha are treated as prereleases. And for github releases, there is a pre-release flag.

malice00 avatar Jul 01 '25 23:07 malice00

here are snippets of the process used in some of my projects

  • https://github.com/CycloneDX/cyclonedx-javascript-library/blob/1e335d8bfa01a46df2b7eb6ce61e9d022f8060f7/.github/workflows/release.yml#L94
  • https://github.com/CycloneDX/cyclonedx-javascript-library/blob/1e335d8bfa01a46df2b7eb6ce61e9d022f8060f7/.github/workflows/release.yml#L138-L142

and

  • https://github.com/CycloneDX/cyclonedx-javascript-library/blob/1e335d8bfa01a46df2b7eb6ce61e9d022f8060f7/.github/workflows/release.yml#L189

you could probably implement something that analyses the version number and detects whether it contains -alpha||-beta||-rc - and in this case use a NPM tag that that isn't "latest", and sets the GH release a prerelease ...

like this detection

  • https://github.com/CycloneDX/cyclonedx-php-composer/blob/dc6acc8b9b6651dce93c3122edcc4e3424df845c/.github/workflows/release.yml#L48-L53 for
  • https://github.com/CycloneDX/cyclonedx-php-composer/blob/dc6acc8b9b6651dce93c3122edcc4e3424df845c/.github/workflows/release.yml#L64-L64

jkowalleck avatar Jul 01 '25 23:07 jkowalleck

Awesome, thanks for all of that!

malice00 avatar Jul 01 '25 23:07 malice00

ah, and you would not trigger the rolling releases for such prereleases.

jkowalleck avatar Jul 01 '25 23:07 jkowalleck