cycjimmy / semantic-release-action

GitHub Action for Semantic Release
https://github.com/marketplace/actions/action-for-semantic-release
MIT License
550 stars 98 forks source link

README: Latest semantic-version release not used by default in v3 #148

Closed MikeMcC399 closed 1 year ago

MikeMcC399 commented 1 year ago

Problem description

The README statement "If no version range is specified, latest version will be used by default." is not correct for cycjimmy/semantic-release-action@v3.

Current README text

The README section: Semantic version contains the section:

"semantic_version

{Optional Input Parameter} Specify specifying version range for semantic-release.
If no version range is specified, latest version will be used by default."

steps:
  - name: Checkout
    uses: actions/checkout@v3
  - name: Semantic Release
    uses: cycjimmy/semantic-release-action@v3
    with:
      semantic_version: 15.13.28  # It is recommended to specify specifying version range
                                  # for semantic-release.
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

It is recommended to manually specify a version of semantic-release to prevent errors caused during the official semantic-release upgrade."

Steps to reproduce

Run using the following from README section: Basic Usage

steps:
  - name: Checkout
    uses: actions/checkout@v3
  - name: Semantic Release
    uses: cycjimmy/semantic-release-action@v3
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

and examine the GitHub action log files which show:

[semantic-release] › ℹ  Running semantic-release version 19.0.5

semantic-release version 19.0.5 is not the latest release of semantic-release.

The repository semantic-release currently shows v20.1.0 tagged as "Latest".

Expected behavior

The README file should correctly reflect how cycjimmy/semantic-release-action@v3 works.

Suggested fix

In the README file change:

"If no version range is specified, latest version will be used by default."

to

"If no version range is specified with cycjimmy/semantic-release-action@v3 then semantic-release version 19.0.5 is used. Earlier versions of cycjimmy/semantic-release-action default to using the latest version of semantic-release, so in this case you should specify version 19 or lower.

Note: Version 20.0.0 of semantic-release and later is currently incompatible with any GitHub JavaScript action, including cycjimmy/semantic-release-action, since it requires Node.js 18. GitHub currently only offers node12 and node16 environments (see runs for JavaScript actions).

In several places the English sounds a bit strange with "Specify specifying version range ...". That would be better as simply "Specify version range ...".

It would also be advisable to update the example.

MikeMcC399 commented 1 year ago

Let me know if you agree with the suggestion. Also, if you would like me to submit a PR for this I can do that.

cycjimmy commented 1 year ago

If you would like to maintain this document, you are more than welcome to submit a PR. 👍

Let me know if you agree with the suggestion. Also, if you would like me to submit a PR for this I can do that.

MikeMcC399 commented 1 year ago

@cycjimmy

If you would like to maintain this document, you are more than welcome to submit a PR.

Thanks for your response. I will prepare a PR for submission.

Which commit message should I use?

To make sure that the updated README also appears on https://www.npmjs.com/package/@cycjimmy/semantic-release-action it would need a release to be triggered. Which commit message do you suggest to use? I am not sure if docs(README): would trigger a release. Should I perhaps use fix(docs):?

MikeMcC399 commented 1 year ago
cycjimmy commented 1 year ago

It's great. Thanks for your contribution.

MikeMcC399 commented 1 year ago

Hi @cycjimmy

Thanks for merging this submission!

The changed README is now visible on:

It is not published to:

To get the updated README to appear on the npm Registry you would need to trigger a release. Do you want to do that?

I noticed also that the npm Registry is showing 3.1.1 as the latest version, not 3.2.0, so you might want to look at that in any case. The README is @v3 though, so it seems it is a bit mixed up there.

cycjimmy commented 1 year ago

It doesn't matter. This action is mainly used on GitHub. 😄

MikeMcC399 commented 1 year ago

@cycjimmy

It doesn't matter. This action is mainly used on GitHub. 😄

It's up to you to decide of course. I understand that the action is used on GitHub, but users might read the README in the npm repository.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: