cedrickring / golang-action

A GitHub Action to run Go commands
Apache License 2.0
134 stars 33 forks source link

Actions support for multiple go version go1.10 ... go1.12 #4

Closed dougnukem closed 5 years ago

dougnukem commented 5 years ago

depends on https://github.com/cedrickring/golang-action/pull/3

Manages support for multiple golang versions in the repo so they can be referenced by github repo URL in ,

The benefit of having these in the repo itself it means that users that want to import that action can do it by github URL and don't have to rely on adding / maintaining special go1.10/go1.11/go1.12 branches and tags. This is similar to how Golang manages multiple versions of go in their official Docker images:

For example now to use a specific version of go users can reference it as:

action "ci" {
  uses="cedrickring/golang-action/go1.12@1.1.1"
  ...
}

This PR also updates the Docker tag and publish behavior.

See here for examples of tagged images published to Docker hub:

Docker images are published and tagged as follows:

We then build and publish specific go version variants for users that want to pin the specific go version they are using:

Next Steps

cedrickring commented 5 years ago

@dougnukem you need to rebase now

cedrickring commented 5 years ago

So to bump the version, I just have to call version-bump-<major|minor|patch> right?

I like that approach. Makes updating the action quite easy while still having support for all go versions! 😄

dougnukem commented 5 years ago

@cedrickring rebased

Yes for releases you should be able to just run:

$ make version-bump-minor
$ git commit -a -m "update minor version"
# Do a github release

We could even look into doing a more robust one:

# runs bump-version-<major | minor | patch>
# commits changes
# Tags build and creates a github release and tag with $VERSION
$ make release-version-minor