2 Commits

Author SHA1 Message Date
726d9c5a09 add scripts for manually packaging and releasing
All checks were successful
Backend Actions / check (push) Successful in 34s
Backend Actions / build (push) Successful in 34s
Backend Actions / test (push) Successful in 42s
2025-07-25 16:25:51 +01:00
7826018d61 Experiment with automatic packaging and releasing
All checks were successful
Backend Actions / check (push) Successful in 12s
Backend Actions / build (push) Successful in 21s
Backend Actions / package (push) Successful in 15s
Backend Actions / test (push) Successful in 29s
use rust-webapp image for release

use npm rather than pnpm

use node 24

use rust latest image

add cache to release

check for tag before releasing

check for tag before releasing

release 0.0.3
2025-07-25 15:35:08 +01:00
7 changed files with 14453 additions and 9987 deletions

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
mkdir package
pushd backend
cargo build --release
cp -v target/release/nuchat ../package/
popd
pushd ui
pnpm run build
cp -rv .output ../package/ui
popd
tar -cf - package/ | zstd -19 -T0 -o package.tar.zst

36
scripts/environ.sh Normal file
View File

@ -0,0 +1,36 @@
#!/usr/bin/env bash
function check_tags() {
TAGS="$(git tag --points-at HEAD)"
if [ -n "$TAGS" ]; then
TAG=$(echo "$TAGS" | grep -E '^v[0-9]+.[0-9]+.[0-9]+$' | sort -V | tail -1)
else
echo "No release tag found"
return 1
fi
}
function package() {
PACKAGE_DIR="${PACKAGE_DIR:-package}"
mkdir "$PACKAGE_DIR" > /dev/null 2>&1
pushd backend
cargo build --release
cp -v target/release/nuchat ../package/
popd
pushd ui
npm ci
npm run build
cp -rv .output ../package/ui
popd
OUT_FILE="${OUT_FILE:-package.tar.zst}"
if [ -f "$OUT_FILE" ]; then
rm "$OUT_FILE" > /dev/null 2>&1
fi
tar -cf - package/ | zstd -19 -T0 -o "${OUT_DIR}${OUT_FILE}"
}

25
scripts/release.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
. ./scripts/environ.sh
check_tags
if [ -n "$TAG" ]; then
echo "Found tag $TAG"
RELEASE_VERSION=$(echo "$TAG" | sed 's/v//')
echo "Releasing $RELEASE_VERSION"
echo ""
else
exit 1
fi
package
if [ ! -f package.tar.zst ]; then
echo "failed to generate package"
exit 1
fi
curl -s -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
--upload-file "$OUT_DIR$OUT_FILE" \
"https://git.molloy.xyz/api/packages/fergus-molloy/generic/nuchat/$RELEASE_VERSION/nuchat.tar.zst"

View File

@ -2,11 +2,5 @@
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
modules: [
'@nuxt/eslint',
'@nuxt/icon',
'@nuxt/image',
'@nuxt/test-utils'
]
modules: ['@nuxt/eslint', '@nuxt/icon', '@nuxt/test-utils']
})

14387
ui/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,11 +11,9 @@
},
"dependencies": {
"@nuxt/eslint": "1.6.0",
"@nuxt/icon": "1.15.0",
"@nuxt/image": "1.10.0",
"@nuxt/test-utils": "3.19.2",
"eslint": "^9.31.0",
"nuxt": "^4.0.0",
"@nuxt/icon": "^1.15.0",
"@nuxt/test-utils": "^3.19.2",
"nuxt": "^4.0.1",
"vue": "^3.5.17",
"vue-router": "^4.5.1"
}

9958
ui/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff