build: add source tarballs to nightly builds

This commit is contained in:
CJ van den Berg 2025-09-23 15:19:45 +02:00
parent 15e27a6104
commit 34594942c7
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -85,9 +85,13 @@ echo building...
./zig build -Dpackage_release --prefix "$DESTDIR/build" ./zig build -Dpackage_release --prefix "$DESTDIR/build"
VERSION=$(/bin/cat "$DESTDIR/build/version")
git archive --format=tar.gz --output="$DESTDIR/flow-$VERSION-source.tar.gz" HEAD
git archive --format=zip --output="$DESTDIR/flow-$VERSION-source.zip" HEAD
cd "$DESTDIR/build" cd "$DESTDIR/build"
VERSION=$(/bin/cat version)
TARGETS=$(/bin/ls) TARGETS=$(/bin/ls)
for target in $TARGETS; do for target in $TARGETS; do
@ -146,18 +150,27 @@ cd ..
cat "$release_notes" cat "$release_notes"
ASSETS=""
if [ -z "$NO_FLOWCONTROL" ]; then if [ -z "$NO_FLOWCONTROL" ]; then
ASSETS="$ASSETS --asset $DESTDIR/flow-${VERSION}-source.tar.gz"
ASSETS="$ASSETS --asset $DESTDIR/flow-${VERSION}-source.tar.gz.sig"
ASSETS="$ASSETS --asset $DESTDIR/flow-${VERSION}-source.tar.gz.sha256"
ASSETS="$ASSETS --asset $DESTDIR/flow-${VERSION}-source.zip"
ASSETS="$ASSETS --asset $DESTDIR/flow-${VERSION}-source.zip.sig"
ASSETS="$ASSETS --asset $DESTDIR/flow-${VERSION}-source.zip.sha256"
echo uploading to git.flow-control.dev echo uploading to git.flow-control.dev
tea releases create --login flow-control --repo "$repo" --tag "$VERSION" --title "$title $VERSION" --note-file "$release_notes" tea releases create --login flow-control --repo "$repo" --tag "$VERSION" --title "$title $VERSION" --note-file "$release_notes" \
$ASSETS
fi fi
if [ -z "$NO_CODEBERG" ]; then if [ -z "$NO_CODEBERG" ]; then
ASSETS=""
for a in $DESTDIR/*; do for a in $DESTDIR/*; do
ASSETS="$ASSETS --asset $a" ASSETS="$ASSETS --asset $a"
done done
echo uploading to codeberg.org echo uploading to codeberg.org
tea releases create --login codeberg --repo "$repo" --tag "$VERSION" --title "$title $VERSION" --note-file "$release_notes" $ASSETS tea releases create --login codeberg --repo "$repo" --tag "$VERSION" --title "$title $VERSION" --note-file "$release_notes" \
$ASSETS
fi fi
if [ -z "$NO_GITHUB" ]; then if [ -z "$NO_GITHUB" ]; then