scotty/.build.yml
2025-04-29 11:05:37 +02:00

32 lines
775 B
YAML

image: archlinux
packages:
- go
- goreleaser-bin
- hut
- weblate-wlc
secrets:
- eafb7dc6-c02d-4b26-a960-61b968a4f454
oauth: pages.sr.ht/PAGES:RW
tasks:
- weblate-update: |
wlc --format text pull scotty
- test: |
cd scotty
go build -v .
go test -v ./...
- build: |
cd scotty
GIT_REF=$(git describe --always)
if [[ "$GIT_REF" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]
then
goreleaser release --clean
else
goreleaser release --snapshot --clean
fi
cd dist/
tar cvf artifacts.tar scotty-*.{gz,zip} scotty_*_checksums.txt
- publish-redirect: |
# Update redirect on https://go.uploadedlobster.com/scotty
./scotty/pages/publish.sh
artifacts:
- scotty/dist/artifacts.tar