Skip to content

Commit 2eb01cc

Browse files
committed
Add automated GitHub release system
1 parent 9622b47 commit 2eb01cc

7 files changed

Lines changed: 720 additions & 3 deletions

File tree

.github/RELEASE_QUICKREF.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# GitHub Release Quick Reference
2+
3+
## Create a New Release (Quick Steps)
4+
5+
```powershell
6+
# 1. Make sure all changes are committed
7+
git status
8+
git add .
9+
git commit -m "Prepare for release"
10+
11+
# 2. Create and push a version tag
12+
git tag -a v1.0.0 -m "Release version 1.0.0"
13+
git push origin main
14+
git push origin v1.0.0
15+
16+
# 3. Wait 10-15 minutes for the automated build
17+
# 4. Check GitHub → Actions → Watch workflow
18+
# 5. Check GitHub → Releases → View your new release
19+
```
20+
21+
## Version Numbers (Semantic Versioning)
22+
23+
```
24+
v1.0.0 → vMAJOR.MINOR.PATCH
25+
26+
MAJOR (v2.0.0) - Breaking changes
27+
MINOR (v1.1.0) - New features (backward compatible)
28+
PATCH (v1.0.1) - Bug fixes (backward compatible)
29+
```
30+
31+
## Common Commands
32+
33+
```powershell
34+
# List all tags
35+
git tag
36+
37+
# Delete a local tag
38+
git tag -d v1.0.0
39+
40+
# Delete a remote tag
41+
git push --delete origin v1.0.0
42+
43+
# View tag details
44+
git show v1.0.0
45+
46+
# Create an annotated tag with detailed notes
47+
git tag -a v1.0.0 -m "Release v1.0.0
48+
49+
Features:
50+
- New feature 1
51+
- New feature 2
52+
53+
Bug Fixes:
54+
- Fixed issue 1
55+
"
56+
57+
# Tag a specific commit
58+
git tag -a v1.0.0 <commit-hash> -m "Release v1.0.0"
59+
```
60+
61+
## Release Checklist
62+
63+
Before creating a release:
64+
- [ ] All tests pass locally: `dotnet test src/DesktopApp/ImageToPose.sln`
65+
- [ ] Version numbers updated (if applicable)
66+
- [ ] CHANGELOG.md updated (if you maintain one)
67+
- [ ] README.md reflects new features
68+
- [ ] All changes committed to main branch
69+
- [ ] Code reviewed and approved
70+
71+
## Platform Output Files
72+
73+
The automated workflow creates these files:
74+
- `ImageToPose-Windows-x64.zip` - Windows 64-bit
75+
- `ImageToPose-Windows-ARM64.zip` - Windows ARM
76+
- `ImageToPose-Linux-x64.zip` - Linux 64-bit
77+
- `ImageToPose-macOS-x64.zip` - macOS Intel
78+
- `ImageToPose-macOS-ARM64.zip` - macOS ARM (M1/M2/M3)
79+
80+
## First-Time Setup
81+
82+
1. Enable GitHub Actions permissions:
83+
- Go to: Settings → Actions → General
84+
- Select: "Read and write permissions"
85+
- Enable: "Allow GitHub Actions to create and approve pull requests"
86+
87+
2. Commit the workflow files:
88+
```powershell
89+
git add .github/workflows/
90+
git commit -m "Add automated release workflows"
91+
git push origin main
92+
```
93+
94+
## Troubleshooting
95+
96+
**Problem:** Workflow not triggering
97+
- **Solution:** Make sure tag starts with 'v' (e.g., v1.0.0, not 1.0.0)
98+
99+
**Problem:** Permission denied
100+
- **Solution:** Check Settings → Actions → General → Workflow permissions
101+
102+
**Problem:** Tests failing
103+
- **Solution:** Run `dotnet test` locally and fix issues before tagging
104+
105+
**Problem:** Release already exists
106+
- **Solution:** Delete release on GitHub, delete tag, create new version
107+
108+
## Manual Build (Emergency)
109+
110+
If automation fails:
111+
112+
```powershell
113+
# Build for Windows 64-bit
114+
dotnet publish src/DesktopApp/ImageToPose.Desktop/ImageToPose.Desktop.csproj `
115+
-c Release `
116+
-r win-x64 `
117+
--self-contained true `
118+
-p:PublishSingleFile=true `
119+
-o ./publish/win-x64
120+
121+
# Create zip
122+
Compress-Archive -Path ./publish/win-x64/* `
123+
-DestinationPath ./ImageToPose-Windows-x64.zip
124+
125+
# Upload manually to GitHub release
126+
```
127+
128+
## Useful Links
129+
130+
- Actions logs: `https://github.com/AlexRynas/Image_To_Pose_Generator/actions`
131+
- Releases: `https://github.com/AlexRynas/Image_To_Pose_Generator/releases`
132+
- Settings: `https://github.com/AlexRynas/Image_To_Pose_Generator/settings`
133+
134+
## Example Release Workflow
135+
136+
```powershell
137+
# Version 1.0.0 - Initial release
138+
git tag -a v1.0.0 -m "Initial public release"
139+
git push origin v1.0.0
140+
141+
# Version 1.0.1 - Bug fix
142+
git commit -m "Fix: Critical bug in API validation"
143+
git tag -a v1.0.1 -m "Bug fix release: API validation"
144+
git push origin v1.0.1
145+
146+
# Version 1.1.0 - New feature
147+
git commit -m "Feature: Add batch processing"
148+
git tag -a v1.1.0 -m "Feature release: Batch processing support"
149+
git push origin v1.1.0
150+
151+
# Version 2.0.0 - Breaking change
152+
git commit -m "Breaking: New rig format"
153+
git tag -a v2.0.0 -m "Major release: New rig format"
154+
git push origin v2.0.0
155+
```

.github/RELEASE_TEMPLATE.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: Release Template
3+
about: Template for creating release notes
4+
title: 'Release v[VERSION]'
5+
---
6+
7+
## 🎉 What's New in v[VERSION]
8+
9+
### ✨ Features
10+
- Feature description here
11+
- Another feature
12+
13+
### 🐛 Bug Fixes
14+
- Fixed: Issue description
15+
- Fixed: Another issue
16+
17+
### ⚡ Performance Improvements
18+
- Improvement description
19+
20+
### 📚 Documentation
21+
- Documentation updates
22+
23+
### 🔧 Technical Changes
24+
- Technical changes for developers
25+
26+
---
27+
28+
## 📦 Installation
29+
30+
Download the appropriate version for your platform:
31+
32+
- **Windows (64-bit Intel/AMD):** `ImageToPose-Windows-x64.zip`
33+
- **Windows (ARM64):** `ImageToPose-Windows-ARM64.zip` *(for Surface devices, etc.)*
34+
- **Linux (64-bit):** `ImageToPose-Linux-x64.zip`
35+
- **macOS (Intel):** `ImageToPose-macOS-x64.zip`
36+
- **macOS (Apple Silicon):** `ImageToPose-macOS-ARM64.zip` *(for M1/M2/M3 Macs)*
37+
38+
### First Time Setup
39+
1. Extract the zip file
40+
2. Run the executable (`ImageToPose.Desktop.exe` on Windows)
41+
3. Enter your OpenAI API key (get one at https://platform.openai.com/api-keys)
42+
43+
## 🔄 Upgrading
44+
45+
Simply download the new version and replace the old executable. Your settings will be preserved.
46+
47+
## ⚠️ Breaking Changes
48+
49+
*List any breaking changes here, or remove this section if none*
50+
51+
## 📋 Requirements
52+
53+
- Windows 10/11 (64-bit) or macOS 10.15+ or Linux with GTK
54+
- OpenAI API key
55+
- Internet connection for API calls
56+
57+
## 🙏 Acknowledgments
58+
59+
*Optional: Thank contributors, testers, or mention sponsorships*
60+
61+
## 📝 Full Changelog
62+
63+
**Full Changelog**: https://github.com/AlexRynas/Image_To_Pose_Generator/compare/v[PREVIOUS_VERSION]...v[CURRENT_VERSION]
64+
65+
---
66+
67+
### Need Help?
68+
69+
- 📖 [Documentation](https://github.com/AlexRynas/Image_To_Pose_Generator/blob/main/README.md)
70+
- 🐛 [Report a Bug](https://github.com/AlexRynas/Image_To_Pose_Generator/issues/new)
71+
- 💡 [Request a Feature](https://github.com/AlexRynas/Image_To_Pose_Generator/issues/new)

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: '9.0.x'
21+
22+
- name: Restore dependencies
23+
run: dotnet restore src/DesktopApp/ImageToPose.sln
24+
25+
- name: Build
26+
run: dotnet build src/DesktopApp/ImageToPose.sln --no-restore --configuration Release
27+
28+
- name: Run tests
29+
run: dotnet test src/DesktopApp/ImageToPose.sln --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-results.trx"
30+
31+
- name: Publish test results
32+
uses: dorny/test-reporter@v1
33+
if: success() || failure()
34+
with:
35+
name: .NET Tests
36+
path: '**/test-results.trx'
37+
reporter: dotnet-trx

.github/workflows/release.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*' # Triggers on version tags like v1.0.0, v2.1.3, etc.
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
include:
14+
- os: windows-latest
15+
runtime: win-x64
16+
artifact-name: ImageToPose-Windows-x64
17+
- os: windows-latest
18+
runtime: win-arm64
19+
artifact-name: ImageToPose-Windows-ARM64
20+
- os: ubuntu-latest
21+
runtime: linux-x64
22+
artifact-name: ImageToPose-Linux-x64
23+
- os: macos-latest
24+
runtime: osx-x64
25+
artifact-name: ImageToPose-macOS-x64
26+
- os: macos-latest
27+
runtime: osx-arm64
28+
artifact-name: ImageToPose-macOS-ARM64
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Setup .NET
35+
uses: actions/setup-dotnet@v4
36+
with:
37+
dotnet-version: '9.0.x'
38+
39+
- name: Restore dependencies
40+
run: dotnet restore src/DesktopApp/ImageToPose.sln
41+
42+
- name: Run tests
43+
run: dotnet test src/DesktopApp/ImageToPose.sln --no-restore --verbosity normal
44+
45+
- name: Publish application
46+
run: |
47+
dotnet publish src/DesktopApp/ImageToPose.Desktop/ImageToPose.Desktop.csproj `
48+
--configuration Release `
49+
--runtime ${{ matrix.runtime }} `
50+
--self-contained true `
51+
--output ./publish/${{ matrix.runtime }} `
52+
-p:PublishSingleFile=true `
53+
-p:IncludeNativeLibrariesForSelfExtract=true `
54+
-p:EnableCompressionInSingleFile=true `
55+
-p:DebugType=None `
56+
-p:DebugSymbols=false
57+
58+
- name: Create archive (Windows)
59+
if: runner.os == 'Windows'
60+
run: |
61+
Compress-Archive -Path ./publish/${{ matrix.runtime }}/* -DestinationPath ./${{ matrix.artifact-name }}.zip
62+
63+
- name: Create archive (Unix)
64+
if: runner.os != 'Windows'
65+
run: |
66+
cd ./publish/${{ matrix.runtime }}
67+
zip -r ../../${{ matrix.artifact-name }}.zip .
68+
cd ../..
69+
70+
- name: Upload artifact
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: ${{ matrix.artifact-name }}
74+
path: ${{ matrix.artifact-name }}.zip
75+
76+
create-release:
77+
needs: build-and-release
78+
runs-on: ubuntu-latest
79+
permissions:
80+
contents: write
81+
82+
steps:
83+
- name: Checkout code
84+
uses: actions/checkout@v4
85+
86+
- name: Download all artifacts
87+
uses: actions/download-artifact@v4
88+
with:
89+
path: ./artifacts
90+
91+
- name: Extract version from tag
92+
id: get_version
93+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
94+
95+
- name: Create Release
96+
uses: softprops/action-gh-release@v1
97+
with:
98+
name: Release v${{ steps.get_version.outputs.VERSION }}
99+
draft: false
100+
prerelease: false
101+
generate_release_notes: true
102+
files: |
103+
./artifacts/ImageToPose-Windows-x64/ImageToPose-Windows-x64.zip
104+
./artifacts/ImageToPose-Windows-ARM64/ImageToPose-Windows-ARM64.zip
105+
./artifacts/ImageToPose-Linux-x64/ImageToPose-Linux-x64.zip
106+
./artifacts/ImageToPose-macOS-x64/ImageToPose-macOS-x64.zip
107+
./artifacts/ImageToPose-macOS-ARM64/ImageToPose-macOS-ARM64.zip
108+
env:
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)