@gv-sh/specgen-app 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,9 @@ jobs:
40
40
  git fetch origin $MAIN_BRANCH:$MAIN_BRANCH
41
41
  git checkout $MAIN_BRANCH
42
42
 
43
+ # Pull latest changes to avoid conflicts
44
+ git pull --rebase origin $MAIN_BRANCH
45
+
43
46
  # Update the README badge
44
47
  VERSION="${{ steps.package-version.outputs.current-version }}"
45
48
  sed -i "s/version-[0-9]\+\.[0-9]\+\.[0-9]\+/version-${VERSION}/g" README.md
@@ -54,7 +57,8 @@ jobs:
54
57
  echo "No changes to commit"
55
58
  else
56
59
  git commit -m "Update version badge to v${{ steps.package-version.outputs.current-version }}"
57
- git push origin $MAIN_BRANCH
60
+ # Use --force-with-lease for safer force pushing that checks remote changes
61
+ git push --force-with-lease origin $MAIN_BRANCH
58
62
  fi
59
63
 
60
64
  - name: Install dependencies
@@ -0,0 +1,94 @@
1
+ name: Release Process
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Triggers on version tags like v0.1.3, v0.1.4, etc.
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '18'
24
+ registry-url: 'https://registry.npmjs.org'
25
+
26
+ - name: Extract version from tag
27
+ id: extract-version
28
+ run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
29
+
30
+ - name: Update README badge
31
+ run: |
32
+ # Update the version badge in README.md
33
+ VERSION="${{ steps.extract-version.outputs.VERSION }}"
34
+ sed -i "s/version-[0-9]\+\.[0-9]\+\.[0-9]\+/version-${VERSION}/g" README.md
35
+
36
+ # Verify the change was made
37
+ grep "version-" README.md
38
+
39
+ - name: Install dependencies
40
+ run: npm install
41
+
42
+ - name: Test setup process
43
+ run: |
44
+ # Run setup to verify everything works
45
+ npm run setup
46
+
47
+ # Verify all components are extracted
48
+ if [ ! -d "server" ]; then
49
+ echo "Error: server directory not found"
50
+ exit 1
51
+ fi
52
+ if [ ! -d "admin" ]; then
53
+ echo "Error: admin directory not found"
54
+ exit 1
55
+ fi
56
+ if [ ! -d "user" ]; then
57
+ echo "Error: user directory not found"
58
+ exit 1
59
+ fi
60
+
61
+ echo "Setup verification completed successfully"
62
+
63
+ - name: Publish to NPM
64
+ run: npm publish
65
+ env:
66
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
67
+
68
+ - name: Commit README changes to main branch
69
+ run: |
70
+ # Save current commit information
71
+ CURRENT_COMMIT=$(git rev-parse HEAD)
72
+
73
+ # Configure git
74
+ git config --local user.email "action@github.com"
75
+ git config --local user.name "GitHub Action"
76
+
77
+ # Checkout main branch
78
+ git fetch origin main:main
79
+ git checkout main
80
+
81
+ # Update the version badge in README.md on main branch
82
+ VERSION="${{ steps.extract-version.outputs.VERSION }}"
83
+ sed -i "s/version-[0-9]\+\.[0-9]\+\.[0-9]\+/version-${VERSION}/g" README.md
84
+
85
+ git add README.md
86
+
87
+ # Only commit if there are changes
88
+ if ! git diff --staged --quiet; then
89
+ git commit -m "Update version badge to v${VERSION} [skip ci]"
90
+ git push origin main
91
+ fi
92
+
93
+ # Return to the original commit
94
+ git checkout ${CURRENT_COMMIT}
@@ -46,6 +46,9 @@ jobs:
46
46
 
47
47
  BRANCH_NAME=$(git symbolic-ref --short HEAD)
48
48
 
49
+ # Pull latest changes to avoid conflicts
50
+ git pull --rebase origin $BRANCH_NAME
51
+
49
52
  git add README.md
50
53
 
51
54
  # Check if there are changes to commit
@@ -55,4 +58,4 @@ jobs:
55
58
  fi
56
59
 
57
60
  git commit -m "Update version badge to v${{ steps.package-version.outputs.current-version }}"
58
- git push origin $BRANCH_NAME
61
+ git push --force-with-lease origin $BRANCH_NAME
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SpecGen App - Complete Platform
2
2
 
3
- [![Version](https://img.shields.io/badge/version-0.1.4-blue.svg)](https://github.com/gv-sh/specgen-app)
3
+ [![Version](https://img.shields.io/badge/version-0.1.5-blue.svg)](https://github.com/gv-sh/specgen-app)
4
4
 
5
5
  A unified deployment package for the SpecGen speculative fiction generator platform.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gv-sh/specgen-app",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Complete SpecGen application with server, admin, and user interfaces",
5
5
  "main": "index.js",
6
6
  "scripts": {