Skip to content

Commit a3748a7

Browse files
committed
Adding release workflow
1 parent 192eda4 commit a3748a7

9 files changed

Lines changed: 703 additions & 9 deletions

File tree

.github/CREATING_FIRST_RELEASE.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Creating Your First Release (v0.0.1)
2+
3+
Follow these steps to create the first release of Prompt Evaluator:
4+
5+
## Step 1: Verify Everything Works
6+
7+
```bash
8+
# Run all tests
9+
npm test
10+
11+
# Build the application locally
12+
npm run build
13+
14+
# Test the installer on your platform (optional)
15+
npm run dist:mac # or dist:win or dist:linux
16+
```
17+
18+
## Step 2: Commit All Changes
19+
20+
Make sure all your changes are committed:
21+
22+
```bash
23+
git add .
24+
git commit -m "Prepare for v0.0.1 release"
25+
git push origin master
26+
```
27+
28+
## Step 3: Create and Push the Release Tag
29+
30+
```bash
31+
# Create the tag
32+
git tag -a v0.0.1 -m "Release version 0.0.1"
33+
34+
# Push the tag to GitHub
35+
git push origin v0.0.1
36+
```
37+
38+
## Step 4: Monitor the Build
39+
40+
1. Go to your GitHub repository
41+
2. Click on the "Actions" tab
42+
3. You should see a workflow run called "Build and Release"
43+
4. Click on it to monitor the progress
44+
45+
The workflow will:
46+
- ✅ Build installers for macOS, Windows, and Linux (in parallel)
47+
- ✅ Run all tests
48+
- ✅ Create a GitHub release
49+
- ✅ Upload all installers to the release
50+
51+
This typically takes 15-20 minutes to complete.
52+
53+
## Step 5: Verify the Release
54+
55+
Once the workflow completes:
56+
57+
1. Go to the "Releases" section of your GitHub repository
58+
2. You should see "Release v0.0.1"
59+
3. Verify that all installer files are attached:
60+
- `Prompt-Evaluator-0.0.1.dmg` (macOS)
61+
- `Prompt-Evaluator-0.0.1-mac.zip` (macOS)
62+
- `Prompt-Evaluator-Setup-0.0.1.exe` (Windows)
63+
- `Prompt-Evaluator-0.0.1-win.zip` (Windows)
64+
- `Prompt-Evaluator-0.0.1.AppImage` (Linux)
65+
- `prompt-evaluator_0.0.1_amd64.deb` (Linux)
66+
67+
## Alternative: Manual Trigger
68+
69+
If you prefer not to use git tags, you can manually trigger the release:
70+
71+
1. Go to GitHub Actions
72+
2. Select "Build and Release" workflow
73+
3. Click "Run workflow"
74+
4. Enter version: `0.0.1`
75+
5. Click "Run workflow"
76+
77+
## What Happens Next?
78+
79+
Users can now:
80+
1. Visit your GitHub releases page
81+
2. Download the appropriate installer for their platform
82+
3. Install and run Prompt Evaluator
83+
84+
## Troubleshooting
85+
86+
### Workflow Fails
87+
88+
Check the workflow logs:
89+
- If tests fail, fix them and try again
90+
- If build fails, check the build scripts
91+
- If upload fails, check GitHub permissions
92+
93+
### Missing Files
94+
95+
If some installer files are missing:
96+
1. Check the "Build installer" step logs
97+
2. Verify the electron-builder configuration in `package.json`
98+
3. Ensure all required build assets exist
99+
100+
### Can't Push Tag
101+
102+
If you get permission errors:
103+
```bash
104+
git push origin v0.0.1 --force # Use with caution
105+
```
106+
107+
Or delete and recreate the tag:
108+
```bash
109+
git tag -d v0.0.1
110+
git push origin :refs/tags/v0.0.1
111+
git tag -a v0.0.1 -m "Release version 0.0.1"
112+
git push origin v0.0.1
113+
```
114+
115+
## Next Steps
116+
117+
After creating v0.0.1:
118+
1. Test the installers on different platforms
119+
2. Get feedback from users
120+
3. Plan for v0.0.2 with bug fixes and improvements
121+
4. Update version in `package.json` for next release
122+
123+
## Notes
124+
125+
- The version in `package.json` is currently set to `0.0.1`
126+
- Future releases: increment the version and create a new tag
127+
- Release notes are automatically generated from commits
128+
- You can edit the release description on GitHub after creation

.github/RELEASE_CHECKLIST.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Release Checklist
2+
3+
Use this checklist when creating a new release.
4+
5+
## Pre-Release
6+
7+
- [ ] All tests pass locally (`npm test`)
8+
- [ ] Application builds successfully (`npm run build`)
9+
- [ ] All features are working as expected
10+
- [ ] Version number updated in `package.json`
11+
- [ ] README.md updated with new features (if any)
12+
- [ ] All changes committed and pushed to master
13+
14+
## Creating Release
15+
16+
- [ ] Create git tag: `git tag -a v{version} -m "Release version {version}"`
17+
- [ ] Push tag to GitHub: `git push origin v{version}`
18+
- [ ] Monitor GitHub Actions workflow
19+
- [ ] Wait for all build jobs to complete (~15-20 mins)
20+
21+
## Post-Release Verification
22+
23+
- [ ] Release created on GitHub
24+
- [ ] All 6 installer files attached to release:
25+
- [ ] macOS .dmg
26+
- [ ] macOS .zip
27+
- [ ] Windows .exe
28+
- [ ] Windows .zip
29+
- [ ] Linux .AppImage
30+
- [ ] Linux .deb
31+
- [ ] Release notes generated correctly
32+
- [ ] Download and test one installer from each platform
33+
34+
## Distribution
35+
36+
- [ ] Announce release to users
37+
- [ ] Update any external documentation
38+
- [ ] Close related GitHub issues
39+
- [ ] Update project board/milestones
40+
41+
## Version Numbers Reference
42+
43+
- **0.0.x** - Initial development versions
44+
- **0.x.0** - Beta versions
45+
- **1.0.0** - First stable release
46+
- **x.y.z** - Follow semantic versioning
47+
48+
## Quick Commands
49+
50+
```bash
51+
# Check current version
52+
cat package.json | grep version
53+
54+
# Update version (updates package.json)
55+
npm version 0.0.2 # or patch/minor/major
56+
57+
# Create and push tag
58+
git tag -a v0.0.2 -m "Release version 0.0.2"
59+
git push origin v0.0.2
60+
61+
# Delete tag if needed (before pushing)
62+
git tag -d v0.0.2
63+
64+
# Delete remote tag
65+
git push origin :refs/tags/v0.0.2
66+
```
67+
68+
## Troubleshooting
69+
70+
If workflow fails:
71+
1. Check the "Actions" tab for error messages
72+
2. Review the failed job logs
73+
3. Fix the issue locally
74+
4. Delete the tag: `git push origin :refs/tags/v{version}`
75+
5. Recreate and push the tag
76+
77+
If release is missing files:
78+
1. Check the "Upload artifacts" step in workflow
79+
2. Verify electron-builder configuration
80+
3. Re-run the workflow if it was a transient issue
81+
82+
## Next Release Planning
83+
84+
After successful release:
85+
- [ ] Create milestone for next version
86+
- [ ] Plan features for next release
87+
- [ ] Update project roadmap
88+
- [ ] Collect user feedback

.github/WORKFLOW_DIAGRAM.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# GitHub Actions Workflow Diagram
2+
3+
## Release Workflow Flow
4+
5+
```
6+
┌─────────────────────────────────────────────────────────────┐
7+
│ TRIGGER EVENT │
8+
│ • Git tag push (v*) │
9+
│ • Manual workflow dispatch │
10+
└─────────────────────────────────────────────────────────────┘
11+
12+
┌─────────────────────────────────────────────────────────────┐
13+
│ JOB 1: TEST │
14+
│ Runner: ubuntu-latest │
15+
│ ┌───────────────────────────────────────────────────────┐ │
16+
│ │ 1. Checkout code │ │
17+
│ │ 2. Setup Node.js 18 │ │
18+
│ │ 3. Install dependencies (npm ci) │ │
19+
│ │ 4. Run all unit tests (npm run test:run) │ │
20+
│ │ 5. Upload test results/coverage │ │
21+
│ └───────────────────────────────────────────────────────┘ │
22+
└─────────────────────────────────────────────────────────────┘
23+
24+
✅ Tests Pass?
25+
↙ ↘
26+
Yes No
27+
↓ ↓
28+
│ ❌ STOP
29+
│ (No build)
30+
31+
┌─────────────────────────────────────────────────────────────┐
32+
│ JOB 2: BUILD (Parallel) │
33+
│ │
34+
│ ┌─────────────────┐ ┌─────────────────┐ ┌──────────────┐ │
35+
│ │ macOS Build │ │ Windows Build │ │ Linux Build │ │
36+
│ │ macos-latest │ │ windows-latest │ │ubuntu-latest │ │
37+
│ ├─────────────────┤ ├─────────────────┤ ├──────────────┤ │
38+
│ │ 1. Checkout │ │ 1. Checkout │ │ 1. Checkout │ │
39+
│ │ 2. Setup Node │ │ 2. Setup Node │ │ 2. Setup Node│ │
40+
│ │ 3. Install deps │ │ 3. Install deps │ │ 3. Install │ │
41+
│ │ 4. Build app │ │ 4. Build app │ │ 4. Build app │ │
42+
│ │ 5. Build .dmg │ │ 5. Build .exe │ │ 5. Build │ │
43+
│ │ Build .zip │ │ Build .zip │ │ .AppImage │ │
44+
│ │ 6. Upload │ │ 6. Upload │ │ Build .deb│ │
45+
│ │ artifacts │ │ artifacts │ │ 6. Upload │ │
46+
│ └─────────────────┘ └─────────────────┘ └──────────────┘ │
47+
└─────────────────────────────────────────────────────────────┘
48+
49+
All Builds Complete Successfully
50+
51+
┌─────────────────────────────────────────────────────────────┐
52+
│ JOB 3: RELEASE │
53+
│ Runner: ubuntu-latest │
54+
│ ┌───────────────────────────────────────────────────────┐ │
55+
│ │ 1. Checkout code │ │
56+
│ │ 2. Get version from tag/input │ │
57+
│ │ 3. Download all build artifacts │ │
58+
│ │ 4. Prepare release files │ │
59+
│ │ 5. Create GitHub Release │ │
60+
│ │ - Tag: v0.0.1 │ │
61+
│ │ - Title: Release v0.0.1 │ │
62+
│ │ - Body: Release notes │ │
63+
│ │ - Files: All 6 installers │ │
64+
│ └───────────────────────────────────────────────────────┘ │
65+
└─────────────────────────────────────────────────────────────┘
66+
67+
✅ COMPLETE!
68+
69+
┌─────────────────────────────────────────────────────────────┐
70+
│ GITHUB RELEASE CREATED │
71+
│ • macOS: .dmg, .zip │
72+
│ • Windows: .exe, .zip │
73+
│ • Linux: .AppImage, .deb │
74+
│ • Downloadable by users │
75+
└─────────────────────────────────────────────────────────────┘
76+
```
77+
78+
## Key Features
79+
80+
### 🛡️ Safety First
81+
- **Tests run first**: If tests fail, no builds are executed
82+
- **Saves resources**: Prevents wasting ~15 minutes of build time if code is broken
83+
- **Fast feedback**: Know if tests fail within 1-2 minutes
84+
85+
### ⚡ Parallel Builds
86+
- All 3 platforms build simultaneously
87+
- Total build time: ~5-7 minutes (vs 15-20 minutes if sequential)
88+
- Independent builds: One platform failing doesn't affect others
89+
90+
### 📦 Automated Release
91+
- Release created automatically after successful builds
92+
- All artifacts attached to release
93+
- Release notes generated from commits
94+
- Users can download immediately
95+
96+
## Timeline
97+
98+
```
99+
Minute 0: Workflow triggered
100+
Minute 1: Tests start running
101+
Minute 2: ✅ Tests complete
102+
Minute 3: All 3 build jobs start in parallel
103+
├─ macOS build starts
104+
├─ Windows build starts
105+
└─ Linux build starts
106+
Minute 8: Builds complete
107+
Minute 9: Release job starts
108+
Minute 10: ✅ Release created and published
109+
```
110+
111+
## Error Handling
112+
113+
```
114+
┌──────────────┐
115+
│ Test Fails │ → ❌ Stop (no builds run)
116+
└──────────────┘
117+
118+
┌──────────────┐
119+
│ macOS Fails │ → ⚠️ Release created without macOS installers
120+
└──────────────┘
121+
122+
┌──────────────┐
123+
│ All Fail │ → ❌ No release created
124+
└──────────────┘
125+
126+
┌──────────────┐
127+
│ Release Fails│ → ⚠️ Builds succeed but release not created
128+
└──────────────┘ (artifacts still available)
129+
```
130+
131+
## Monitoring
132+
133+
You can monitor the workflow:
134+
1. GitHub → Actions tab
135+
2. Click on the running workflow
136+
3. See real-time logs for each job
137+
4. Download artifacts even if release fails

0 commit comments

Comments
 (0)