Skip to content

Commit

Permalink
[IMP] config: GH release follow semantic versions of package
Browse files Browse the repository at this point in the history
When creating a GH release, the default option is to set it as the
latest one. By disabling this option, we rely on the semantic
version of the release tag to define the latest release.

We can also set the prerelease option to flag potentially unstable
releases.

References:
[1] https://github.blog/changelog/2022-10-21-explicitly-set-the-latest-release/
[2] https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28
[3] https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository

closes #2141

Signed-off-by: Pierre Rousseau (pro) <[email protected]>
  • Loading branch information
rrahir committed Mar 1, 2023
1 parent 30e406f commit 9d5af51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
tag: ${{ fromJSON(steps.parse.outputs.data).version }}
body: ${{ fromJSON(steps.parse.outputs.data).body }}
artifacts: "./dist/*.*"
makeLatest: false
prerelease: ${{ fromJSON(steps.parse.outputs.data).prerelease }}
- name: Publish
run: npm publish
env:
Expand Down
3 changes: 2 additions & 1 deletion tools/parse_message.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ try {
JSON.stringify({
title,
version,
body: lines.join("\n"),
body: commitLines.join("\n"),
prerelease: version.includes("alpha"),
})
);
} catch (error) {
Expand Down

0 comments on commit 9d5af51

Please sign in to comment.