-
Notifications
You must be signed in to change notification settings - Fork 884
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.23' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
make build-all-binaries | ||
ls -la | ||
./package-github-binaries.sh | ||
ls -la dist/ |
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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
set -u -e -o pipefail | ||
|
||
if [[ -z "${DRONE_TAG}" ]] ; then | ||
echo 'ERROR: Missing DRONE_TAG env' | ||
exit 1 | ||
fi | ||
|
||
echo "go install ghr" | ||
go install github.com/tcnksm/[email protected] | ||
|
||
mkdir -p dist | ||
|
||
for build in $(ls .build); do | ||
echo "Creating archive for ${build}" | ||
|
||
cp LICENSE README.md ".build/${build}/" | ||
|
||
if [[ "${build}" =~ windows-.*$ ]] ; then | ||
|
||
# Make sure to clear out zip files to prevent zip from appending to the archive. | ||
rm "dist/${build}.zip" || true | ||
cd ".build/" && zip -r --quiet -9 "../dist/${build}.zip" "${build}" && cd ../ | ||
else | ||
tar -C ".build/" -czf "dist/${build}.tar.gz" "${build}" | ||
fi | ||
done | ||
|
||
cd dist | ||
sha256sum *.gz *.zip > sha256sums.txt | ||
ls -la | ||
cd .. | ||
|