ngs / go-release.action Goto Github PK
View Code? Open in Web Editor NEWAutomate publishing Go build artifacts for GitHub releases through GitHub Actions
Home Page: https://github.com/marketplace/actions/go-release-binary
Automate publishing Go build artifacts for GitHub releases through GitHub Actions
Home Page: https://github.com/marketplace/actions/go-release-binary
It is not quite clear to me what artifacts are being packaged by this action by default. I see that I can use EXTRA_FILES
to request additional files, but I can't see what files are being packaged by default.
Sure I can do a quick experiment and figure it out on my own, but it would be nice and helpful if the documentation spelled it out.
Add ENV variable CMD_PATH
example:
CMD_PATH = "cmd/hcfc/main.go"
to build.sh
- go build
+ go build $CMD_PATH
Hi,
Great action guys
Noticed when trying to use CMD_PATH
with v1.0.2
it didn't work
It did work when I switched to master
Looks like the v1.0.2
tag is tracking older code
https://github.com/ngs/go-release.action/blob/v1.0.2/Dockerfile#L10
Would be great to upgrade the golang to 1.16-alpine (https://github.com/ngs/go-release.action/blob/master/Dockerfile#L1) as it is available and from 1.15 compiling cross platform is much better
I want to release the binary files without compression(tar.gz
), can you add an option for disable compression?
I just tested your GitHub action for my company project with Go. I named my binary_name like: "<project_name>_<$release_version>" that give this -> test-ci_v0.48.
But the package is named like this -> test-ci_v0.48-v0.48-darwin-amd64.tar.gz. You see the unwanted result ?
So my question is: is it possible in the project or in the configuration file to set specific name for package name ? And if so, can you add the possibility the set it please.
Best regards
(PS: sorry i'm french, i do my best in english)
I just tried to used this action on one of my project but I can't run the generated Linux AMD64 version on my Linux AMD64 machine.
It seems to be related to the dynamic linking to the musl C standard library:
./my-generated-exe-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=EmDsSWNEfmQPkFFReAgq/dJXhA5cdfTA7Hjt5NAr_/x6hwGePSXNBHuxESCok8/OgK2kl0KXGeheYHuSau3, not stripped
ldd ./my-generated-exe-amd64
linux-vdso.so.1 (0x00007ffc7b327000)
libc.musl-x86_64.so.1 => not found
However, the i386 version works fine and is statically linked:
file ./docker-manager
./my-generated-exe-i386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, Go BuildID=y1r_iZoir6tGXmSRok8q/YdxAzTSJRZV17bSFn5r4/AtCijuMBQ5R07GgeAe1b/xsie6X5UnPs1fnjuhsv8, not stripped
ldd ./my-generated-exe-i386
not a dynamic executable
Could this be solved by statically link the AMD64 version also? Or maybe switch to libc which is more commonly available?
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz tar.zst
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
Hello!
I need some help.
I try to automatically create binary releases of my go program. I am getting this error when "compile and release":
`+ curl -X POST --data-binary @tmp.tgz -H 'Content-Type: application/gzip' -H 'Authorization: ***' 'null?name=promalert2bmctsom_null_linux_amd64.tar.gz'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: null`
Couldn't figure out where null is coming from. I guess it want's to upload the binaries but it cant.
Thanks for advice.
Regards,
Patrick
Hello!
The files specified as EXTRA_FILES are not present in the tar.gz archives.
Regards,
Patrick
Latest release has been tagged as v1.0.2
, but the contents of the release are from v1.0.1
.
Hello there,
I am trying to release the binaries in my Github project odfe-kibana-sync but it is failing with no obvious reason - see below a snippet from the pipeline log.
I suspect this is due to this dependency: https://github.com/spf13/cobra. Any idea how to proceed?
Kind regards,
Ayache
`Run ngs/[email protected]
env:
GITHUB_TOKEN: ***
GOARCH: arm64
GOOS: linux
EXTRA_FILES: LICENSE
/usr/bin/docker run --name e492553ed176de4ffd900b3a6f454da009_5bcc2e --label 5588e4 --workdir /github/workspace --rm -e GITHUB_TOKEN -e GOARCH -e GOOS -e EXTRA_FILES -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/odfe-kibana-sync/odfe-kibana-sync":"/github/workspace" 5588e4:92553ed176de4ffd900b3a6f454da009
../../spf13/cobra/bash_completions.go:22:24: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:383:26: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:423:24: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:435:27: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:473:25: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:484:20: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:499:38: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:525:21: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:562:28: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:587:29: undefined: io.StringWriter
../../spf13/cobra/bash_completions.go:587:29: too many errors
github.com/akhettar/odfe-kibana-sync/client
`
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.