-
Notifications
You must be signed in to change notification settings - Fork 769
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sertac Ozercan <[email protected]>
- Loading branch information
Showing
2 changed files
with
10 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,21 +309,14 @@ jobs: | |
build() { | ||
export GOOS="$(echo ${1} | cut -d '-' -f 1)" | ||
export GOARCH="$(echo ${1} | cut -d '-' -f 2)" | ||
# in case of windows, we need to append .exe to the file name | ||
EXTENSION="$(echo ${1} | cut -d '-' -f 3)" | ||
EXTENSION=${EXTENSION/exe/.exe} | ||
FILENAME=${GITHUB_WORKSPACE}/_dist/gator-${TAG}-${GOOS}-${GOARCH} | ||
# build the binary | ||
make bin/gator-${GOOS}-${GOARCH}${EXTENSION} | ||
make bin/gator-${GOOS}-${GOARCH} | ||
# rename the binary to gator | ||
tmp_dir=$(mktemp -d) | ||
cp bin/gator-${GOOS}-${GOARCH}${EXTENSION} ${tmp_dir}/gator${EXTENSION} | ||
cp bin/gator-${GOOS}-${GOARCH} ${tmp_dir}/gator | ||
pushd ${tmp_dir} | ||
if [[ ${EXTENSION} == ".exe" ]]; then | ||
zip ${FILENAME}.zip gator*.exe | ||
else | ||
tar -czf ${FILENAME}.tar.gz gator* | ||
fi | ||
tar -czf ${FILENAME}.tar.gz gator* | ||
popd | ||
} | ||
mkdir -p _dist | ||
|
@@ -332,11 +325,11 @@ jobs: | |
done | ||
wait | ||
pushd _dist | ||
# consolidate tar and zip's sha256sum into a single file | ||
find . -type f -name '*.tar.gz' -o -name '*.zip' | sort | xargs sha256sum >> sha256sums.txt | ||
# consolidate tar's sha256sum into a single file | ||
find . -type f -name '*.tar.gz' | sort | xargs sha256sum >> sha256sums.txt | ||
popd | ||
env: | ||
PLATFORMS: "linux-amd64 linux-arm64 darwin-amd64 darwin-arm64 windows-amd64-exe" | ||
PLATFORMS: "linux-amd64 linux-arm64 darwin-amd64 darwin-arm64" | ||
|
||
- name: Create GitHub release | ||
uses: "marvinpinto/[email protected]" | ||
|
@@ -346,7 +339,6 @@ jobs: | |
files: | | ||
_dist/sha256sums.txt | ||
_dist/*.tar.gz | ||
_dist/*.zip | ||
- name: Publish Helm chart | ||
uses: stefanprodan/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters