arduino/setup-protoc

Error: unable to get latest version

MicheleMinelli opened this issue · 3 comments

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

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

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.

@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)

@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.