arduino / setup-protoc

GitHub Action to setup the protoc compiler for protocol buffers
GNU General Public License v3.0
134 stars 58 forks source link

Error: unable to get latest version #85

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the problem

When trying to use the action with

    - name: Setup protoc
      uses: arduino/setup-protoc@v2.0.0
      with:
        version: "3.20"
        repo-token: ${{ secrets.GITHUB_TOKEN }}

I get

Run arduino/setup-protoc@v2.0.0
  with:
    version: 3.20
    repo-token: ***
    include-pre-releases: false
Error: Error: unable to get latest version

I also tried using @v1.0.0 but no success. Seems similar to what described in #81.

To reproduce

Include

    - name: Setup protoc
      uses: arduino/setup-protoc@v2.0.0
      with:
        version: "3.20"
        repo-token: ${{ secrets.GITHUB_TOKEN }}

in your yml file.

Expected behavior

It works

'arduino/setup-protoc' version

2.0.0

Additional context

No response

Issue checklist

ghost commented 1 year ago

It seems to work with

    - name: Setup protoc
      env:
        ACTIONS_ALLOW_UNSECURE_COMMANDS: true
      uses: arduino/setup-protoc@v1.0.0
      with:
        version: "3.20"

If this is the intended behavior, we can close.

alessio-perugini commented 1 year ago

@MicheleMinelli Thanks for opening this. The intended behavior is that the v2.0.0 handle the new tagging naming convention that starts from v21.0. The 3.20 is supported by the v1.0.0 - v1.3.0 action.

What comes to my mind are the followings:

  1. In a previous attempt you could have provided the 3.20 version without the double quotes (") which could cause that error.
  2. Your previous CI steps do something that requires you to specify that env (ACTIONS_ALLOW_UNSECURE_COMMANDS: true)
ghost commented 1 year ago

@alessio-perugini Thanks for the reply (and for the really nice action!)

Got it then. I got it to work as I wanted with

    - name: Setup protoc
      env:
        ACTIONS_ALLOW_UNSECURE_COMMANDS: true
      uses: arduino/setup-protoc@v1.3.0
      with:
        version: "3.20.1"

Closing.