Skip to content

Allow publishing of pre-release version #111

@ghost

Description

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.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Your Environment

  • semantic-release-chrome version: 3.2.0
  • node version: 18.11.15
  • npm (or yarn) version: 3.3.0

What 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 as 1.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 the PluginConfig interface. When allowPrerelease 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, if 1.0.0-develop.1 is the given pre-release version, then 1.0.0 will be parsed and used for the chrome web store publishing purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions