Coder Social home page Coder Social logo

Comments (9)

gaby avatar gaby commented on July 23, 2024 1

@fredmaggiowski This is what I use:

steps:
  - uses: actions/checkout@v4
  - uses: actions/setup-go@v5
    with:
      go-version: 'stable'
      check-latest: true
  - run: go run hello.go

from setup-go.

spencerschrock avatar spencerschrock commented on July 23, 2024

I believe you're confusing two caches: the tool cache vs the build/package cache, which the argument is for README link.

It sounds like what you want are the stable and oldstable aliases, which are mentioned in the README here.

from setup-go.

fredmaggiowski avatar fredmaggiowski commented on July 23, 2024

ok got it thanks, so being everything sourced from go-versions I assume using stable will give me go1.22 since is currently the latest "stable" version

https://github.com/actions/go-versions/blob/c0555276f6ee861abbf6bc35c752c8547fcbb86e/versions-manifest.json#L3

What if I want to test with versions that are not yet stable? For instance, once we have the first rc for go1.23, use it to make sure my codebase will not have issues

from setup-go.

aparnajyothi-y avatar aparnajyothi-y commented on July 23, 2024

Hello @spencerschrock, Thank you for creating the issue and we will look into it :)

from setup-go.

aparnajyothi-y avatar aparnajyothi-y commented on July 23, 2024

Hello @spencerschrock, Thank you once again for creating this issue
If we want to test with versions of Go that are not yet stable, you can specify the exact version in the with.go-version field of your workflow file. This field supports the 1.x syntax, so you can use 1.23.x to test with the latest release of Go 1.23, including any release candidates. Please refere this document

The actions/setup-go action is designed to download and set up a Go environment of any version specified in the go-version input of the action. The action uses the official Go downloads, which include both stable and unstable versions.
However, the actions/setup-go action only supports versions that are available in the go-versions repository.
However, it's important to note that using non-stable versions may lead to potential instability in your workflows, as they may have not been fully tested or may contain bugs. The best practice is to use stable versions for production code.

from setup-go.

aparnajyothi-y avatar aparnajyothi-y commented on July 23, 2024

Hello @spencerschrock, Please confirm that the above clarification is helpful to proceed to close the issue.

from setup-go.

spencerschrock avatar spencerschrock commented on July 23, 2024

I'm not the issue author, I'm assuming you meant @fredmaggiowski

from setup-go.

fredmaggiowski avatar fredmaggiowski commented on July 23, 2024

I'm not the issue author, I'm assuming you meant @fredmaggiowski

I guess you are right lol

Hello @spencerschrock, Please confirm that the above clarification is helpful to proceed to close the issue.

Yes @aparnajyothi-y sorry for the delay, I had a few busy weeks; i'm verifying it later today and come back at you asap :)

from setup-go.

fredmaggiowski avatar fredmaggiowski commented on July 23, 2024

@fredmaggiowski This is what I use:

steps:
  - uses: actions/checkout@v4
  - uses: actions/setup-go@v5
    with:
      go-version: 'stable'
      check-latest: true
  - run: go run hello.go

@gaby It seems to work, thanks!

https://github.com/rond-authz/rond/actions/runs/7986038478/job/21805633813?pr=323#step:3:11

image

from setup-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.