Compare commits
5 Commits
v0.0.2
...
059129a738
| Author | SHA1 | Date | |
|---|---|---|---|
|
059129a738
|
|||
|
437c9f4a25
|
|||
|
48bf447ce1
|
|||
|
548fa4f0a1
|
|||
|
|
642cca30ad |
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
TAG="$GITHUB_REF_NAME"
|
TAG="$GITEA_REF_NAME"
|
||||||
VERSION=$(echo "$TAG" | sed 's/^v//')
|
VERSION=$(echo "$TAG" | sed 's/^v//')
|
||||||
DATE=$(date +%Y-%m-%d)
|
DATE=$(date +%Y-%m-%d)
|
||||||
|
|
||||||
@@ -33,7 +33,20 @@ find . -name package.json ! -path "*/node_modules/*" | while read file; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# 3. Update CHANGELOG.md (prepend)
|
# 3. Generate commit list since last release
|
||||||
|
# -------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Get the previous tag (fallback to empty if none)
|
||||||
|
LAST_TAG=$(git tag --sort=-creatordate | grep -v "^$TAG$" | head -n 1 || echo "")
|
||||||
|
|
||||||
|
if [ -n "$LAST_TAG" ]; then
|
||||||
|
COMMITS=$(git log "$LAST_TAG"..HEAD --pretty=format:'[%h](https://git.max-richter.dev/max/nodarium/commit/%H) %s')
|
||||||
|
else
|
||||||
|
COMMITS=$(git log HEAD --pretty=format:'[%h](https://git.max-richter.dev/max/nodarium/commit/%H) %s')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------
|
||||||
|
# 4. Update CHANGELOG.md (prepend)
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
|
|
||||||
tmp_changelog="CHANGELOG.tmp"
|
tmp_changelog="CHANGELOG.tmp"
|
||||||
@@ -42,6 +55,11 @@ tmp_changelog="CHANGELOG.tmp"
|
|||||||
echo ""
|
echo ""
|
||||||
echo "$NOTES"
|
echo "$NOTES"
|
||||||
echo ""
|
echo ""
|
||||||
|
if [ -n "$COMMITS" ]; then
|
||||||
|
echo "All Commits:"
|
||||||
|
echo "$COMMITS"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
echo "---"
|
echo "---"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -f CHANGELOG.md ]; then
|
if [ -f CHANGELOG.md ]; then
|
||||||
@@ -54,7 +72,7 @@ mv "$tmp_changelog" CHANGELOG.md
|
|||||||
pnpm exec dprint fmt CHANGELOG.md
|
pnpm exec dprint fmt CHANGELOG.md
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# 4. Create release commit
|
# 5. Create release commit
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
|
|
||||||
git config user.name "release-bot"
|
git config user.name "release-bot"
|
||||||
@@ -71,7 +89,7 @@ fi
|
|||||||
git commit -m "chore(release): $TAG"
|
git commit -m "chore(release): $TAG"
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# 5. Push changes
|
# 6. Push changes
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
|
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|||||||
43
.gitea/scripts/deploy-files.sh
Executable file
43
.gitea/scripts/deploy-files.sh
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
echo "Configuring rclone"
|
||||||
|
|
||||||
|
KEY_FILE="$(mktemp)"
|
||||||
|
echo "${SSH_PRIVATE_KEY}" >"${KEY_FILE}"
|
||||||
|
chmod 600 "${KEY_FILE}"
|
||||||
|
|
||||||
|
mkdir -p ~/.config/rclone
|
||||||
|
cat >~/.config/rclone/rclone.conf <<EOF
|
||||||
|
[sftp-remote]
|
||||||
|
type = sftp
|
||||||
|
host = ${SSH_HOST}
|
||||||
|
user = ${SSH_USER}
|
||||||
|
port = ${SSH_PORT}
|
||||||
|
key_file = ${KEY_FILE}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [[ "${GITEA_REF_TYPE:-}" == "tag" ]]; then
|
||||||
|
TARGET_DIR="${REMOTE_DIR}"
|
||||||
|
elif [[ "${GITEA_EVENT_NAME:-}" == "pull_request" ]]; then
|
||||||
|
SAFE_PR_NAME="${GITEA_HEAD_REF//\//-}"
|
||||||
|
TARGET_DIR="${REMOTE_DIR}_${SAFE_PR_NAME}"
|
||||||
|
elif [[ "${GITEA_REF_NAME:-}" == "main" ]]; then
|
||||||
|
TARGET_DIR="${REMOTE_DIR}_main"
|
||||||
|
else
|
||||||
|
SAFE_REF="${GITEA_REF_NAME//\//-}"
|
||||||
|
TARGET_DIR="${REMOTE_DIR}_${SAFE_REF}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Deploying to ${TARGET_DIR}"
|
||||||
|
|
||||||
|
rclone sync \
|
||||||
|
--update \
|
||||||
|
--verbose \
|
||||||
|
--progress \
|
||||||
|
--exclude _astro/** \
|
||||||
|
--stats 2s \
|
||||||
|
--stats-one-line \
|
||||||
|
--transfers 4 \
|
||||||
|
./app/build/ \
|
||||||
|
"sftp-remote:${TARGET_DIR}"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: 🚀 Release
|
name: 🚀 Lint & Test & Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
- name: 💾 Setup pnpm Cache
|
- name: 💾 Setup pnpm Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -49,36 +49,25 @@ jobs:
|
|||||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" pnpm test
|
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" pnpm test
|
||||||
|
|
||||||
- name: 🚀 Create Release Commit
|
- name: 🚀 Create Release Commit
|
||||||
if: github.ref_type == 'tag'
|
if: gitea.ref_type == 'tag'
|
||||||
run: ./.gitea/scripts/create-release.sh
|
run: ./.gitea/scripts/create-release.sh
|
||||||
|
|
||||||
- name: 🏷️ Create Gitea Release
|
- name: 🏷️ Create Gitea Release
|
||||||
if: github.ref_type == 'tag'
|
if: gitea.ref_type == 'tag'
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ gitea.ref_name }}
|
||||||
release_name: Release ${{ github.ref_name }}
|
release_name: Release ${{ gitea.ref_name }}
|
||||||
body_path: CHANGELOG.md
|
body_path: CHANGELOG.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
- name: 🔑 Configure rclone
|
- name: 🚀 Deploy Changed Files via rclone
|
||||||
if: github.ref_type == 'tag'
|
run: ./.gitea/scripts/deploy-files.sh
|
||||||
run: |
|
|
||||||
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
|
|
||||||
chmod 600 /tmp/id_rsa
|
|
||||||
mkdir -p ~/.config/rclone
|
|
||||||
echo -e "[sftp-remote]\ntype = sftp\nhost = ${SSH_HOST}\nuser = ${SSH_USER}\nport = ${SSH_PORT}\nkey_file = /tmp/id_rsa" > ~/.config/rclone/rclone.conf
|
|
||||||
env:
|
env:
|
||||||
|
REMOTE_DIR: ${{ vars.REMOTE_DIR }}
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
SSH_HOST: ${{ vars.SSH_HOST }}
|
SSH_HOST: ${{ vars.SSH_HOST }}
|
||||||
SSH_PORT: ${{ vars.SSH_PORT }}
|
SSH_PORT: ${{ vars.SSH_PORT }}
|
||||||
SSH_USER: ${{ vars.SSH_USER }}
|
SSH_USER: ${{ vars.SSH_USER }}
|
||||||
|
|
||||||
- name: 🚀 Deploy Changed Files via rclone
|
|
||||||
if: github.ref_type == 'tag'
|
|
||||||
run: |
|
|
||||||
echo "Uploading the rest"
|
|
||||||
rclone sync --update -v --progress --exclude _astro/** --stats 2s --stats-one-line ./app/build/ sftp-remote:${REMOTE_DIR} --transfers 4
|
|
||||||
env:
|
|
||||||
REMOTE_DIR: ${{ vars.REMOTE_DIR }}
|
|
||||||
|
|||||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,14 +1,8 @@
|
|||||||
## v0.0.2 (2026-02-03)
|
## v0.0.2 (2026-02-04)
|
||||||
|
|
||||||
fix(ci): actually deploy on tags
|
fix(ci): actually deploy on tags
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## v0.0.2 (2026-02-03)
|
|
||||||
|
|
||||||
fix(app): correctly handle false value in settings
|
fix(app): correctly handle false value in settings
|
||||||
|
-> This caused a bug where random seed could not be false.
|
||||||
This caused a bug where random seed could not be false.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,10 @@
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(inputValue) && node.type === 'vec3') {
|
||||||
|
return inputValue;
|
||||||
|
}
|
||||||
|
|
||||||
// If the component is supplied with a default value use that
|
// If the component is supplied with a default value use that
|
||||||
if (inputValue !== undefined && typeof inputValue !== 'object') {
|
if (inputValue !== undefined && typeof inputValue !== 'object') {
|
||||||
return inputValue;
|
return inputValue;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
return JSON.stringify(
|
return JSON.stringify(
|
||||||
{
|
{
|
||||||
...g,
|
...g,
|
||||||
nodes: g.nodes.map((n: object) => ({ ...n, tmp: undefined }))
|
nodes: g.nodes.map((n: object) => ({ ...n, tmp: undefined, state: undefined }))
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
2
|
2
|
||||||
|
|||||||
Reference in New Issue
Block a user