30 lines
762 B
YAML
30 lines
762 B
YAML
|
image: alpine/edge
|
||
|
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: |
|
||
|
tag=$(git describe --exact-match 2>/dev/null || true)
|
||
|
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
|