thatisuday / go-cross-build

GitHub Action to build Go (Golang) modules.
https://itnext.io/how-to-set-up-github-workflows-and-create-github-actions-using-docker-3a5ba7ec0988
35 stars 28 forks source link

Cannot find GOROOT directory: /home/runner/work/cyb3rko/MyProject #3

Open cyb3rko opened 3 years ago

cyb3rko commented 3 years ago

I'm receiving the following error: go: cannot find GOROOT directory: /home/runner/work/cyb3rko/DiscordCacheExtractor

What am I missing here? Do I somehow have to define the goroot path?

lukaszraczylo commented 3 years ago

I spent quite a few builds on trying to debug it, kicked in after I specified all the parameters

      - name: Compile binary
        uses: thatisuday/go-cross-build@v1
        with:
          platforms: linux/amd64,darwin/amd64,windows/amd64,linux/arm64,darwin/amd64
          name: semver-gen
          package: ./
          compress: false
          dest: dist
cyb3rko commented 3 years ago

Now I get a different error:

Creating a build using : /usr/local/go/bin/go build -buildmode exe -o /github/workspace/.output/program-linux-amd64 ./demo An error occurred during build: exit status 1 exit status 1

lewislbr commented 2 years ago

Fixed it by using thatisuday/go-cross-build@master, as v1 uses an old Go version.