Compare commits
3 Commits
feat/shape
...
v0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
fdc4802d68
|
|||
|
5a30fce4ec
|
|||
|
0d0eb65ddd
|
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
set -euo pipefail
|
set -eu
|
||||||
|
|
||||||
TAG="$GITHUB_REF_NAME"
|
TAG="$GITHUB_REF_NAME"
|
||||||
VERSION="${TAG#v}"
|
VERSION=$(echo "$TAG" | sed 's/^v//')
|
||||||
DATE=$(date +%Y-%m-%d)
|
DATE=$(date +%Y-%m-%d)
|
||||||
|
|
||||||
echo "🚀 Creating release for $TAG (safe mode)"
|
echo "🚀 Creating release for $TAG (safe mode)"
|
||||||
@@ -26,15 +26,17 @@ git checkout main
|
|||||||
|
|
||||||
echo "🔧 Updating package.json versions to $VERSION"
|
echo "🔧 Updating package.json versions to $VERSION"
|
||||||
|
|
||||||
find . -name package.json -not -path "*/node_modules/*" | while read -r file; do
|
find . -name package.json ! -path "*/node_modules/*" | while read file; do
|
||||||
jq --arg v "$VERSION" '.version = $v' "$file" >"$file.tmp"
|
tmp_file="$file.tmp"
|
||||||
mv "$file.tmp" "$file"
|
jq --arg v "$VERSION" '.version = $v' "$file" >"$tmp_file"
|
||||||
|
mv "$tmp_file" "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# 3. Update CHANGELOG.md (prepend)
|
# 3. Update CHANGELOG.md (prepend)
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
|
|
||||||
|
tmp_changelog="CHANGELOG.tmp"
|
||||||
{
|
{
|
||||||
echo "## $TAG ($DATE)"
|
echo "## $TAG ($DATE)"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -42,10 +44,12 @@ done
|
|||||||
echo ""
|
echo ""
|
||||||
echo "---"
|
echo "---"
|
||||||
echo ""
|
echo ""
|
||||||
cat CHANGELOG.md 2>/dev/null || true
|
if [ -f CHANGELOG.md ]; then
|
||||||
} >CHANGELOG.tmp
|
cat CHANGELOG.md
|
||||||
|
fi
|
||||||
|
} >"$tmp_changelog"
|
||||||
|
|
||||||
mv CHANGELOG.tmp CHANGELOG.md
|
mv "$tmp_changelog" CHANGELOG.md
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# 4. Create release commit
|
# 4. Create release commit
|
||||||
@@ -54,7 +58,7 @@ mv CHANGELOG.tmp CHANGELOG.md
|
|||||||
git config user.name "release-bot"
|
git config user.name "release-bot"
|
||||||
git config user.email "release-bot@ci"
|
git config user.email "release-bot@ci"
|
||||||
|
|
||||||
git add CHANGELOG.md $(find . -name package.json -not -path "*/node_modules/*")
|
git add CHANGELOG.md $(find . -name package.json ! -path "*/node_modules/*")
|
||||||
|
|
||||||
# Skip commit if nothing changed
|
# Skip commit if nothing changed
|
||||||
if git diff --cached --quiet; then
|
if git diff --cached --quiet; then
|
||||||
|
|||||||
18
Dockerfile
18
Dockerfile
@@ -1,15 +1,19 @@
|
|||||||
FROM node:24-alpine
|
FROM node:24-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache --update curl rclone g++
|
# Install all required packages in one layer
|
||||||
|
RUN apk add --no-cache curl git jq g++ make
|
||||||
|
|
||||||
|
# Set Rust paths
|
||||||
ENV RUSTUP_HOME=/usr/local/rustup \
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
||||||
CARGO_HOME=/usr/local/cargo \
|
CARGO_HOME=/usr/local/cargo \
|
||||||
PATH=/usr/local/cargo/bin:$PATH
|
PATH=/usr/local/cargo/bin:$PATH
|
||||||
|
|
||||||
|
# Install Rust, wasm target, and pnpm
|
||||||
RUN curl --silent --show-error --location --fail --retry 3 \
|
RUN curl --silent --show-error --location --fail --retry 3 \
|
||||||
--proto '=https' --tlsv1.2 \
|
--proto '=https' --tlsv1.2 \
|
||||||
--output /tmp/rustup-init.sh https://sh.rustup.rs \
|
--output /tmp/rustup-init.sh https://sh.rustup.rs \
|
||||||
&& sh /tmp/rustup-init.sh -y --no-modify-path --profile minimal \
|
&& sh /tmp/rustup-init.sh -y --no-modify-path --profile minimal \
|
||||||
&& rm /tmp/rustup-init.sh \
|
&& rm /tmp/rustup-init.sh \
|
||||||
&& rustup target add wasm32-unknown-unknown \
|
&& rustup target add wasm32-unknown-unknown \
|
||||||
&& npm i -g pnpm
|
&& rm -rf /usr/local/rustup/toolchains/*/share/doc \
|
||||||
|
&& npm i -g pnpm
|
||||||
|
|||||||
Reference in New Issue
Block a user