chore(release): 1.1.9-rc3

This commit is contained in:
Théo LAGACHE
2026-01-06 16:21:06 +01:00
parent 40a6e9e69f
commit 85b31fc412
6 changed files with 78 additions and 61 deletions
-37
View File
@@ -1,37 +0,0 @@
const fs = require('fs');
const expectedVersion = process.argv[2];
if (!expectedVersion) {
console.log('No version provided to check. Skipping.');
process.exit(0);
}
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
const cff = fs.readFileSync('CITATION.cff', 'utf-8');
const cffVersionMatch = cff.match(/^version: (.*)$/m);
const cffVersion = cffVersionMatch ? cffVersionMatch[1].trim() : null;
let hasError = false;
if (pkg.version !== expectedVersion) {
console.error(`package.json version (${pkg.version}) does not match tag (${expectedVersion})`);
hasError = true;
}
if (cffVersion !== expectedVersion) {
console.error(`CITATION.cff version (${cffVersion}) does not match tag (${expectedVersion})`);
hasError = true;
}
if (pkg.version !== cffVersion) {
console.error(`Version mismatch between files: package.json (${pkg.version}) vs CITATION.cff (${cffVersion})`);
hasError = true;
}
if (hasError) {
process.exit(1);
}
console.log(`Versions match tag ${expectedVersion}`);
+41
View File
@@ -0,0 +1,41 @@
name: Bump version
on:
push:
branches:
- main
permissions:
contents: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Configure git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Bump version
run: |
npm version patch --no-git-tag-version
- name: Commit version
run: |
git add package.json package-lock.json
git commit -m "chore(release): bump version"
- name: Create tag
run: |
VERSION=$(node -p "require('./package.json').version")
git tag $VERSION
git push origin main --tags
-1
View File
@@ -1 +0,0 @@
pnpm test
-20
View File
@@ -1,20 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
while read local_ref local_sha remote_ref remote_sha
do
if echo "$local_ref" | grep -q 'refs/tags/'; then
TAG_NAME=$(echo "$local_ref" | sed 's|refs/tags/||')
VERSION_NUM=$(echo "$TAG_NAME" | sed 's/^v//')
echo "Verifying tag $TAG_NAME against project files..."
node .github/scripts/versions.js "$VERSION_NUM"
if [ $? -ne 0 ]; then
echo "Push aborted due to version mismatch."
exit 1
fi
fi
done
exit 0
+1 -3
View File
@@ -11,8 +11,7 @@
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:drop": "drizzle-kit drop",
"auth:generate": "npx @better-auth/cli generate --config ./src/lib/auth/auth.ts",
"prepare": "husky"
"auth:generate": "npx @better-auth/cli generate --config ./src/lib/auth/auth.ts"
},
"dependencies": {
"@hookform/resolvers": "^5.0.1",
@@ -114,7 +113,6 @@
"eslint-config-next": "^16.0.1",
"eslint-plugin-tailwindcss": "^3.18.0",
"framer-motion": "^12.24.7",
"husky": "^9.1.7",
"postcss": "^8.5.3",
"tailwindcss": "^4.1.7",
"tsx": "^4.19.4",
Executable
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: ./release <version>"
echo "Example: ./release v1.0.0"
exit 1
fi
VERSION=$1
echo "Preparing release $VERSION..."
git add .
if ! git diff-index --quiet HEAD --; then
echo "Committing changes..."
git commit -m "chore(release): $VERSION"
else
echo "No changes to commit. Proceeding to tag..."
fi
if git rev-parse "$VERSION" >/dev/null 2>&1; then
echo "Tag $VERSION already exists. Aborting."
exit 1
fi
echo "Creating tag $VERSION..."
git tag -a "$VERSION" -m "Release $VERSION"
echo "Pushing changes and tags to remote..."
git push
git push origin "$VERSION"
echo "Successfully released $VERSION!"