Compare commits

..

8 Commits

Author SHA1 Message Date
43cef42c3b Merge pull request 'chore(deps): update actions/setup-node action to v6' (#21) from renovate/actions-setup-node-6.x into main
All checks were successful
Changelog + Release on main / changelog_and_release (push) Successful in 10m57s
Reviewed-on: #21
2026-03-21 22:18:31 +00:00
renovate[bot]
29dd867bcb chore(deps): update actions/setup-node action to v6
All checks were successful
Pre-release on non-main branches / prerelease (push) Successful in 42s
2026-03-21 22:17:06 +00:00
dba93b67fd Changed release action
Some checks are pending
Changelog + Release on main / changelog_and_release (push) Has started running
Signed-off-by: Alexander Lyall <alex@adcm.uk>
2026-03-21 22:15:45 +00:00
5d23d0639e Added versioning information to footer of website. General updates to the release action
Some checks failed
Changelog + Release on main / changelog_and_release (push) Failing after 6m47s
Signed-off-by: Alexander Lyall <alex@adcm.uk>
2026-03-21 22:04:49 +00:00
535c62b838 Updated astro to 6.0.8
All checks were successful
Changelog + Release on main / changelog_and_release (push) Successful in 1m46s
Signed-off-by: Alexander Lyall <alex@adcm.uk>
2026-03-21 21:52:43 +00:00
bcac9f3310 Merge pull request 'chore(deps): update dependency astro to v6' (#20) from renovate/astro-6.x into main
All checks were successful
Changelog + Release on main / changelog_and_release (push) Successful in 33s
Reviewed-on: #20
2026-03-21 21:49:14 +00:00
renovate[bot]
3a624cb5cd chore(deps): update dependency astro to v6
All checks were successful
Pre-release on non-main branches / prerelease (push) Successful in 37s
2026-03-21 21:48:00 +00:00
12f605e987 Merge pull request 'chore(deps): update dependency astro to v5.18.1' (#18) from renovate/astro-5.x-lockfile into main
All checks were successful
Changelog + Release on main / changelog_and_release (push) Successful in 1m48s
Reviewed-on: #18
2026-03-21 21:42:36 +00:00
4 changed files with 729 additions and 1288 deletions

View File

@@ -76,14 +76,11 @@ jobs:
shell: bash shell: bash
run: | run: |
set -e set -e
# Extract the first "## ..." section (newest section) from CHANGELOG.md
# Includes the "## ..." heading and everything until the next "## ..." heading.
awk ' awk '
/^## / { if (seen) exit; seen=1 } /^## / { if (seen) exit; seen=1 }
seen { print } seen { print }
' CHANGELOG.md > RELEASE_NOTES.md ' CHANGELOG.md > RELEASE_NOTES.md
# Clean trailing whitespace/newlines a bit
sed -i 's/[[:space:]]*$//' RELEASE_NOTES.md sed -i 's/[[:space:]]*$//' RELEASE_NOTES.md
test -s RELEASE_NOTES.md test -s RELEASE_NOTES.md
@@ -91,27 +88,11 @@ jobs:
head -n 60 RELEASE_NOTES.md head -n 60 RELEASE_NOTES.md
echo "--------------------------" echo "--------------------------"
- name: Create export zip (Computing:Box Website.zip)
shell: bash
run: |
set -e
if [ ! -d "dist" ]; then
echo "❌ dist/ folder not found in repo root"
ls -la
exit 1
fi
rm -f "Computing:Box Website.zip"
(cd dist && zip -r "../Computing:Box Website.zip" .)
test -s "Computing:Box Website.zip"
ls -lh "Computing:Box Website.zip"
- name: Prepare YY.MM.DD letter-suffix tag + release name - name: Prepare YY.MM.DD letter-suffix tag + release name
shell: bash shell: bash
run: | run: |
set -e set -e
# Version: YY.MM.DD (UTC). Swap to `date +...` if you prefer UK-local runner time.
VERSION="$(date -u +'%y.%m.%d')" VERSION="$(date -u +'%y.%m.%d')"
PREFIX="v${VERSION}." PREFIX="v${VERSION}."
@@ -135,12 +116,106 @@ jobs:
TAG="${PREFIX}${next_letter}" TAG="${PREFIX}${next_letter}"
RELEASE_NAME="Computing:Box v${VERSION}.${next_letter}" RELEASE_NAME="Computing:Box v${VERSION}.${next_letter}"
origin_url="$(git remote get-url origin)"
if echo "$origin_url" | grep -q "^git@"; then
host="$(echo "$origin_url" | sed -E 's#git@([^:]+):.*#\1#')"
path="$(echo "$origin_url" | sed -E 's#git@[^:]+:(.*)#\1#')"
origin_url="https://$host/$path"
fi
base="$(echo "$origin_url" | sed -E 's#(https?://[^/]+)/.*#\1#')"
repo_path="$(echo "$origin_url" | sed -E 's#https?://[^/]+/##')"
repo_path="$(echo "$repo_path" | sed -E 's/\.git$//')"
RELEASE_URL="${base}/${repo_path}/releases/tag/${TAG}"
echo "TAG=$TAG" >> "$GITHUB_ENV" echo "TAG=$TAG" >> "$GITHUB_ENV"
echo "RELEASE_NAME=$RELEASE_NAME" >> "$GITHUB_ENV" echo "RELEASE_NAME=$RELEASE_NAME" >> "$GITHUB_ENV"
echo "ZIP_PATH=Computing:Box Website.zip" >> "$GITHUB_ENV" echo "ZIP_PATH=Computing:Box Website.zip" >> "$GITHUB_ENV"
echo "RELEASE_URL=$RELEASE_URL" >> "$GITHUB_ENV"
echo "Using tag: $TAG" echo "Using tag: $TAG"
echo "Release name: $RELEASE_NAME" echo "Release name: $RELEASE_NAME"
echo "Release URL: $RELEASE_URL"
- name: Derive semver package version from tag
shell: bash
run: |
set -e
# Convert:
# v25.03.21a -> 25.3.21-a
PACKAGE_VERSION="$(echo "$TAG" | sed -E 's/^v([0-9]{2})\.0?([0-9]{1,2})\.0?([0-9]{1,2})([a-z])$/\1.\2.\3-\4/')"
if [ -z "$PACKAGE_VERSION" ]; then
echo "❌ Failed to derive PACKAGE_VERSION from TAG=$TAG"
exit 1
fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_ENV"
echo "Using package version: $PACKAGE_VERSION"
- name: Generate version file for Astro footer
shell: bash
run: |
set -e
mkdir -p src/generated
cat > src/generated/version.json <<EOF
{
"version": "${TAG}",
"url": "${RELEASE_URL}"
}
EOF
echo "Generated src/generated/version.json"
cat src/generated/version.json
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 25
cache: npm
- name: Install dependencies
shell: bash
run: |
set -e
npm ci
- name: Update package.json and package-lock.json version
shell: bash
run: |
set -e
npm version "$PACKAGE_VERSION" --no-git-tag-version
echo "package.json version:"
node -p "require('./package.json').version"
echo "package-lock.json version:"
node -p "require('./package-lock.json').version"
- name: Build Astro site
shell: bash
run: |
set -e
npm run build
test -d dist
- name: Create export zip (Computing:Box Website.zip)
shell: bash
run: |
set -e
if [ ! -d "dist" ]; then
echo "❌ dist/ folder not found in repo root"
ls -la
exit 1
fi
rm -f "Computing:Box Website.zip"
(cd dist && zip -r "../Computing:Box Website.zip" .)
test -s "Computing:Box Website.zip"
ls -lh "Computing:Box Website.zip"
- name: Create and push tag (CHANGELOG_PAT) - name: Create and push tag (CHANGELOG_PAT)
shell: bash shell: bash
@@ -153,7 +228,6 @@ jobs:
origin_url="$(git remote get-url origin)" origin_url="$(git remote get-url origin)"
# Convert SSH origin to HTTPS if needed
if echo "$origin_url" | grep -q "^git@"; then if echo "$origin_url" | grep -q "^git@"; then
host="$(echo "$origin_url" | sed -E 's#git@([^:]+):.*#\1#')" host="$(echo "$origin_url" | sed -E 's#git@([^:]+):.*#\1#')"
path="$(echo "$origin_url" | sed -E 's#git@[^:]+:(.*)#\1#')" path="$(echo "$origin_url" | sed -E 's#git@[^:]+:(.*)#\1#')"
@@ -198,7 +272,7 @@ jobs:
"tag_name": tag, "tag_name": tag,
"target_commitish": "main", "target_commitish": "main",
"name": name, "name": name,
"body": body, # newest section only "body": body,
"draft": False, "draft": False,
"prerelease": False, "prerelease": False,
} }
@@ -232,4 +306,34 @@ jobs:
-F "attachment=@${ZIP_PATH}" \ -F "attachment=@${ZIP_PATH}" \
>/dev/null >/dev/null
echo "✅ Release created: ${RELEASE_NAME} (tag: ${TAG}) with asset uploaded" echo "✅ Release created: ${RELEASE_NAME} (tag: ${TAG}) with asset uploaded"
- name: Commit and push version bump (CHANGELOG_PAT)
shell: bash
env:
CHANGELOG_PAT: ${{ secrets.CHANGELOG_PAT }}
run: |
set -e
if git diff --quiet -- package.json package-lock.json; then
echo "No version changes to commit."
else
git config user.name "release-bot"
git config user.email "release-bot@users.noreply.local"
git add package.json package-lock.json
git commit -m "chore(release): bump version to ${PACKAGE_VERSION} [skip ci]"
origin_url="$(git remote get-url origin)"
# Convert SSH → HTTPS if needed
if echo "$origin_url" | grep -q "^git@"; then
host="$(echo "$origin_url" | sed -E 's#git@([^:]+):.*#\1#')"
path="$(echo "$origin_url" | sed -E 's#git@[^:]+:(.*)#\1#')"
origin_url="https://$host/$path"
fi
authed_url="$(echo "$origin_url" | sed -E "s#^https://#https://oauth2:${CHANGELOG_PAT}@#")"
git push "$authed_url" HEAD:main
fi

1857
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,6 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"astro": "^5.18.0" "astro": "^6.0.8"
} }
} }

View File

@@ -1,5 +1,9 @@
--- ---
import "../styles/global.css"; import "../styles/global.css";
import versionInfo from "../generated/version.json";
const version = versionInfo.version;
const releaseUrl = versionInfo.url;
const { title = "Computing:Box" } = Astro.props; const { title = "Computing:Box" } = Astro.props;
--- ---
@@ -60,6 +64,12 @@ const { title = "Computing:Box" } = Astro.props;
<a href="/legal-code" style="margin-left: 32px; color: var(--muted); text-decoration: underline;">Legal Code</a> <a href="/legal-code" style="margin-left: 32px; color: var(--muted); text-decoration: underline;">Legal Code</a>
</div> </div>
<div>Computer Science Concept Simulators</div> <div>Computer Science Concept Simulators</div>
<div>
Version:
<a href={releaseUrl} target="_blank" rel="noopener noreferrer">
{version}
</a>
</div>
<div>© {new Date().getFullYear()} Computing:Box • Created with ♥ by Mr A Lyall</div> <div>© {new Date().getFullYear()} Computing:Box • Created with ♥ by Mr A Lyall</div>
</div> </div>
</footer> </footer>