-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow publishing of pre-release version #111
Comments
Pull request for this issue can be found here - #112 |
This would be great to have! Especially since Chrome doesn't allow me to control canary releases for an extension and I need a staging extension for QA. I do think the issue described and the solution might need a little adjustment though. I would propose:
{
"plugins": [
[
"semantic-release-chrome",
{
"extensionId": "mppjhhbajcciljocgbadbhbgphjfdmhj",
"asset": "my-extension.zip",
"prereleaseConfig": {
"alpha": {
"extensionId": "my-alpha-extension-id",
},
"beta": {
"extensionId": "my-beta-extension-id",
},
}.
}
],
[
"@semantic-release/github",
{
"assets": ["my-extension.zip"]
}
]
]
} The above config feels a little safer to me. If I hard-coded the extension id and added "allowPrerelease", then I could technically still release to my prod extension from my prerelease branch. If we added the ability to configure prerelease channel configs (and then throw errors on any prerelease branch that doesn't have a config), then the releaser has to be sure they are specifying the correct extension. Also, I think for prerelease, we don't want to scrub the 4th number. That would lead to weird spots where we release 2 or 3 prereleases that are all 1.0.1 and only the first one can release. Looking at the Chrome extension versioning name, it looks like we could just remove the non-numerical prerelease name (like alpha or beta) and just release that number. Source: https://developer.chrome.com/docs/extensions/reference/manifest/version |
Yes. |
It would be great for this plugin to update the "version_name" field in the manifest.json with the "standard" version name normally generated by semantic-release, such as "1.0.0-alpha.1" |
Exactly, "version_name" can be used exclusively for prerelease. |
Issue
When utilizing the semantic-release package's pre-release functionality, the semantic-release-chrome's chrome web api call throws a version format error.
This is preventing me from publishing a new version of my chrome extension to a staging extension while maintaining the pre-release functionality on my develop branch.
Your Environment
semantic-release-chrome
version: 3.2.0node
version: 18.11.15npm
(oryarn
) version: 3.3.0What you did and problem description
My
develop
branch was set up as a pre-release branch in the semantic-release release.config. The semantic-release-chrome plugin was also configured within the release.config. I triggered the CD pipeline which resulted in a pre-release version name (such as1.0.0-develop.1
) to be passed to the semantic-release-chrome plugin. This version caused a chrome web store error due to the invalid semantic version format.What happened
I do not have access to the exact error message at this point. It was something along the lines of an invalid version format error.
Reproduction repository/CodeSandbox
Suggested solution
Add an optional boolean
allowPrerelease
field to thePluginConfig
interface. WhenallowPrerelease
is specified and set to true, the semantic version number is parsed from the given version string instead of using the raw string. For example, if1.0.0-develop.1
is the given pre-release version, then1.0.0
will be parsed and used for the chrome web store publishing purposes.The text was updated successfully, but these errors were encountered: