Skip to content

Add documentation about accepted formats for Go versions #82

@thaJeztah

Description

@thaJeztah

I'm fairly new to GitHub actions, and to this action, but couldn't find documentation about accepted formats for Go versions.

Specifying Go-versions has historically been somewhat of a "hit/miss" in various tools, due to a combination of;

  • Go itself using non-standard versions (go prefix, e.g. go1.15.3)
  • Go itself omitting .0 on releases (two digits for go1.15, not go1.15.0, but patch releases do have three digits (go1.15.3))
  • Different conventions in different tools

Different conventions used in different tools / CI systems can make the selected version ambiguous;

  • 1.15 could either mean go1.15 (1.15.0) or "latest patch release of go1.15"

  • 1.15.x is accepted by some tools to get "latest patch release" of 1.15 (usually excluding pre-releases, such as go1.15beta1 or go1.15rc1)

  • Omitting quotes can lead to "surprising" results: I recall when Go 1.10 was released, many users who updated their CI configuration discovered they were now installing Go 1.1 (because 1.10 (without quotes) lead to YAML interpreting the version as a number)

  • Are versions like tip supported?

  • Travis's gimme (https://github.com/travis-ci/gimme) also has some variations;

    gimme --resolve 1.x
    1.15.3
    
    gimme --resolve 1.14.x
    1.14.10
    
    gimme --resolve 1.14.3
    1.14.3
    
    gimme --resolve 1.15
    1.15
    
    gimme --resolve tip
    tip
    
    gimme --resolve stable
    1.15.3
    
    gimme --resolve oldstable
    1.14.10

In short, it would be good to have a section to explain what version formats are accepted, and what their result is.

@bryanmacfarlane @thboop happy to contribute a pull-request (after I know what versions are accepted 😅)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions