Skip to content

Commit 576899f

Browse files
committed
v3.1.0 initial
1 parent a8ddb65 commit 576899f

37 files changed

Lines changed: 3394 additions & 868 deletions

.github/workflows/auto-release.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Auto Release on package.json version bump
2+
3+
on:
4+
push:
5+
branches: [v3]
6+
paths:
7+
- package.json
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Read current version
23+
id: current
24+
run: |
25+
VERSION=$(node -p "require('./package.json').version")
26+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
27+
28+
- name: Read previous version (from previous commit)
29+
id: previous
30+
run: |
31+
PREV_VERSION=$(git show HEAD~1:package.json 2>/dev/null | node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" || echo "")
32+
echo "version=$PREV_VERSION" >> "$GITHUB_OUTPUT"
33+
34+
- name: Check if version increased
35+
id: check
36+
run: |
37+
CUR="${{ steps.current.outputs.version }}"
38+
PREV="${{ steps.previous.outputs.version }}"
39+
40+
echo "Current: $CUR"
41+
echo "Previous: $PREV"
42+
43+
# if previous doesn't exist (first commit containing package.json), skip
44+
if [ -z "$PREV" ]; then
45+
echo "should_release=false" >> "$GITHUB_OUTPUT"
46+
exit 0
47+
fi
48+
49+
# Compare semver using node's semver package if available; fallback to simple inequality
50+
node -e "
51+
const cur='${CUR}';
52+
const prev='${PREV}';
53+
let should = cur !== prev;
54+
try {
55+
const semver = require('semver');
56+
should = semver.gt(cur, prev);
57+
} catch (_) {}
58+
console.log('should_release=' + should);
59+
" >> "$GITHUB_OUTPUT"
60+
61+
- name: Stop if no bump
62+
if: steps.check.outputs.should_release != 'true'
63+
run: echo "No version increase detected."
64+
65+
- name: Create tag + GitHub Release
66+
if: steps.check.outputs.should_release == 'true'
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
tag_name: v${{ steps.current.outputs.version }}
70+
name: v${{ steps.current.outputs.version }}
71+
generate_release_notes: true

dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
node_modules
2+
dist
3+
.git
4+
.gitignore
5+
.vscode
6+
.DS_Store
7+
sessions/
8+
.dev/
9+
diagnostics/
10+
note
11+
accounts.dev.json
12+
accounts.main.json
13+
.playwright-chromium-installed

0 commit comments

Comments
 (0)