2024-10-03 17:32:53 +00:00
|
|
|
image: alpine/edge
|
2024-10-03 18:01:32 +00:00
|
|
|
oauth: git.sr.ht/OBJECTS:RW git.sr.ht/REPOSITORIES:RO git.sr.ht/PROFILE:RO
|
2024-10-03 17:32:53 +00:00
|
|
|
packages:
|
|
|
|
- go
|
|
|
|
- just
|
|
|
|
- hut
|
|
|
|
sources:
|
|
|
|
- git@git.sr.ht:~timharek/yr
|
|
|
|
triggers:
|
|
|
|
- action: email
|
|
|
|
condition: failure
|
|
|
|
to: Tim Hårek Andreassen <tim@harek.no>
|
|
|
|
tasks:
|
|
|
|
- setup: |
|
|
|
|
echo 'cd yr' >> ~/.buildenv
|
|
|
|
- test: |
|
|
|
|
just test
|
|
|
|
- build: |
|
2024-10-03 17:59:28 +00:00
|
|
|
tag=$(git describe --exact-match --tags HEAD 2>/dev/null || true)
|
2024-10-03 17:32:53 +00:00
|
|
|
if [ -z "$tag" ]; then
|
|
|
|
echo "Current commit is not a tag; not building anything"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
version=$(echo "$tag" | tr -d 'v')
|
|
|
|
|
|
|
|
just build-release $tag $version darwin amd64
|
|
|
|
just build-release $tag $version darwin arm64
|
|
|
|
just build-release $tag $version linux amd64
|
|
|
|
just build-release $tag $version windows amd64
|