scotty/.build.yml
2025-04-29 11:15:49 +02:00

43 lines
1.2 KiB
YAML

image: archlinux
packages:
- go
- goreleaser-bin
- hut
- weblate-wlc
secrets:
- 0e2ad815-6c46-4cea-878e-70fc33f71e77
oauth: pages.sr.ht/PAGES:RW
tasks:
- weblate-update: |
cd scotty
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
# Skip releasing if this is not a tagged release
- only-tags: |
cd scotty
GIT_REF=$(git describe --always)
[[ "$GIT_REF" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]] || complete-build
- announce-release: |
# Announce new release to Go Module Index
cd scotty
VERSION=$(git describe --exact-match)
curl "https://proxy.golang.org/go.uploadedlobster.com/scotty/@v/${VERSION}.info"
artifacts:
- scotty/dist/artifacts.tar