thatisuday / go-cross-build Goto Github PK
View Code? Open in Web Editor NEWGitHub Action to build Go (Golang) modules.
Home Page: https://itnext.io/how-to-set-up-github-workflows-and-create-github-actions-using-docker-3a5ba7ec0988
GitHub Action to build Go (Golang) modules.
Home Page: https://itnext.io/how-to-set-up-github-workflows-and-create-github-actions-using-docker-3a5ba7ec0988
Build failed without any explanation.
2021-04-18T20:22:55.9499410Z An error occurred during build: exit status 2
2021-04-18T20:22:55.9504744Z exit status 1
Relaytive to what working directory?
# workflow tasks
jobs:
generate:
name: Generate cross-platform builds
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Generate build files
uses: thatisuday/go-cross-build@v1
with:
platforms: 'linux/amd64, darwin/amd64, windows/amd64'
package: 'cmd/<pkg>'
name: 'program'
compress: 'true'
dest: 'dist'
Is what I am using but after it runs successfully I don't see any dist folder. What I expect is a dist folder to be in the repo with the three platforms compressed in it. Instead I don't see anything. I have tried variations of ..
, ../dist
, .
and nothing makes them appear
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?
add a reduce binary size options
set -ldflags "-s -w"
build options.
build after use upx
compress compiled binary.
The project used to build correctly previously on github actions and correctly build locally (using both windows and wsl).
Unfortunately now it doesn't build anymore.
this is my go.mod
module jim
go 1.19
require gorm.io/gorm v1.22.5
require (
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.4 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-sqlite3 v1.14.5 // indirect
)
require (
github.com/fatih/color v1.13.0
golang.org/x/sys v0.1.0 // indirect
gorm.io/driver/sqlite v1.1.4
)
this is the github yaml
name: release
on:
release:
types:
- created
jobs:
generate:
name: Generate cross-platform builds
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Generate build files
uses: thatisuday/[email protected]
with:
platforms: "windows/amd64, linux/amd64, darwin/amd64"
package: ""
name: "jim"
compress: "true"
dest: "dist"
ldflags: "\"-X 'jim/utils.Version=${{ github.ref_name }}'\""
- name: Copy build-artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: "./dist/*.tar.gz"
this is the action's output
thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.