Skip to content

Commit 2ffc973

Browse files
committed
Setup release infrastructure for v0.1.0
1 parent 357d753 commit 2ffc973

9 files changed

Lines changed: 770 additions & 2 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
```swift
15+
import Math
16+
17+
// Your code here
18+
let value = Math(42)
19+
// ...
20+
```
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Actual behavior**
26+
What actually happened instead.
27+
28+
**Environment:**
29+
- OS: [e.g. macOS 14.0, Ubuntu 22.04]
30+
- Swift version: [e.g. 6.1]
31+
- Math library version: [e.g. 0.1.0]
32+
33+
**Additional context**
34+
Add any other context about the problem here.
35+
36+
**Stack trace or error messages**
37+
```
38+
Paste any error messages or stack traces here
39+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Example usage**
19+
Show how you would like to use this feature:
20+
```swift
21+
import Math
22+
23+
// Example of how the feature would work
24+
let result = Math.newFeature(...)
25+
```
26+
27+
**Additional context**
28+
Add any other context or screenshots about the feature request here.
29+
30+
**Would you be willing to contribute this feature?**
31+
- [ ] Yes, I can work on a pull request
32+
- [ ] No, but I can help with testing
33+
- [ ] No, just requesting

.github/RELEASING.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# Quick Release Guide
2+
3+
## TL;DR - Release Checklist
4+
5+
For a quick release of version `X.Y.Z`:
6+
7+
```bash
8+
# 1. Make sure everything is ready
9+
swift test # All tests must pass
10+
swift build -c release # Must build successfully
11+
12+
# 2. Update CHANGELOG.md
13+
# - Add release date to version section
14+
# - Create new [Unreleased] section at top
15+
16+
# 3. Commit and run release script
17+
git add .
18+
git commit -m "Prepare release vX.Y.Z"
19+
./scripts/release.sh X.Y.Z
20+
```
21+
22+
That's it! The GitHub Action will handle creating the release automatically.
23+
24+
---
25+
26+
## Detailed Steps
27+
28+
### 1. Pre-Release Checks
29+
30+
```bash
31+
# Ensure you're on main branch
32+
git checkout main
33+
git pull origin main
34+
35+
# Run all tests
36+
swift test
37+
38+
# Build in release mode
39+
swift build -c release
40+
41+
# Check for uncommitted changes
42+
git status
43+
```
44+
45+
### 2. Update CHANGELOG.md
46+
47+
Edit `CHANGELOG.md`:
48+
49+
```markdown
50+
# Changelog
51+
52+
## [Unreleased]
53+
<!-- New section for future changes -->
54+
55+
## [X.Y.Z] - 2025-10-04
56+
57+
### Added
58+
- New feature 1
59+
- New feature 2
60+
61+
### Fixed
62+
- Bug fix 1
63+
64+
### Changed
65+
- Breaking change 1 (if any)
66+
```
67+
68+
### 3. Commit Changes
69+
70+
```bash
71+
git add CHANGELOG.md
72+
git commit -m "Prepare release vX.Y.Z"
73+
git push origin main
74+
```
75+
76+
### 4. Create Release
77+
78+
Option A - Use the script (recommended):
79+
```bash
80+
./scripts/release.sh X.Y.Z
81+
```
82+
83+
Option B - Manual:
84+
```bash
85+
git tag -a vX.Y.Z -m "Release version X.Y.Z"
86+
git push origin main
87+
git push origin vX.Y.Z
88+
```
89+
90+
### 5. Verify Release
91+
92+
1. Go to https://github.com/PinkQween/Math/actions
93+
2. Watch the "Release" workflow complete
94+
3. Check https://github.com/PinkQween/Math/releases
95+
4. Edit release notes if needed
96+
97+
### 6. Test Installation
98+
99+
```bash
100+
# Create a test project
101+
mkdir test-math
102+
cd test-math
103+
swift package init --type executable
104+
105+
# Add dependency
106+
cat > Package.swift << EOF
107+
// swift-tools-version: 6.1
108+
import PackageDescription
109+
110+
let package = Package(
111+
name: "test-math",
112+
dependencies: [
113+
.package(url: "https://github.com/PinkQween/Math.git", from: "X.Y.Z")
114+
],
115+
targets: [
116+
.executableTarget(name: "test-math", dependencies: ["Math"])
117+
]
118+
)
119+
EOF
120+
121+
# Test it works
122+
swift package update
123+
swift build
124+
```
125+
126+
## Version Numbers
127+
128+
- **Alpha** (0.x.x): Early development, expect breaking changes
129+
- **Beta** (1.0.0-beta.x): Feature-complete, minimal API changes
130+
- **RC** (1.0.0-rc.x): Release candidate, final testing
131+
- **Stable** (1.0.0+): Production-ready, semantic versioning
132+
133+
### Current Version: 0.1.0 (Alpha)
134+
135+
Next releases:
136+
- 0.1.1 - Bug fixes only
137+
- 0.2.0 - New features (backward compatible if possible)
138+
- 1.0.0-beta.1 - First beta (when API is stable)
139+
- 1.0.0 - First stable release
140+
141+
## Troubleshooting
142+
143+
**Q: Tag already exists**
144+
```bash
145+
# Delete local tag
146+
git tag -d vX.Y.Z
147+
148+
# Delete remote tag
149+
git push origin :refs/tags/vX.Y.Z
150+
```
151+
152+
**Q: Need to fix something after tagging**
153+
```bash
154+
# Delete the tag and redo
155+
git tag -d vX.Y.Z
156+
git push origin :refs/tags/vX.Y.Z
157+
158+
# Make fixes
159+
git add .
160+
git commit -m "Fix for release"
161+
162+
# Re-run release
163+
./scripts/release.sh X.Y.Z
164+
```
165+
166+
**Q: GitHub Action failed**
167+
- Check https://github.com/PinkQween/Math/actions
168+
- Fix the issue
169+
- Re-run the workflow or delete/recreate the tag
170+
171+
## Post-Release
172+
173+
- [ ] Announce on relevant channels
174+
- [ ] Update any documentation sites
175+
- [ ] Monitor for issues
176+
- [ ] Respond to GitHub issues/discussions

.github/pull_request_template.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## Description
2+
<!-- Provide a clear description of what this PR does -->
3+
4+
## Type of Change
5+
<!-- Mark the relevant option with an 'x' -->
6+
- [ ] Bug fix (non-breaking change which fixes an issue)
7+
- [ ] New feature (non-breaking change which adds functionality)
8+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
9+
- [ ] Documentation update
10+
- [ ] Performance improvement
11+
- [ ] Code refactoring
12+
- [ ] Test coverage improvement
13+
14+
## Related Issue
15+
<!-- Link to the issue this PR addresses, if applicable -->
16+
Fixes #(issue number)
17+
18+
## Changes Made
19+
<!-- List the main changes made in this PR -->
20+
-
21+
-
22+
-
23+
24+
## Testing
25+
<!-- Describe the tests you ran and their results -->
26+
- [ ] All existing tests pass
27+
- [ ] Added new tests for new functionality
28+
- [ ] Tested on macOS
29+
- [ ] Tested on Linux (if applicable)
30+
31+
**Test Results:**
32+
```
33+
<!-- Paste output of `swift test` here -->
34+
```
35+
36+
## Checklist
37+
- [ ] My code follows the project's coding style
38+
- [ ] I have commented my code, particularly in hard-to-understand areas
39+
- [ ] I have updated the documentation accordingly
40+
- [ ] I have added tests that prove my fix is effective or that my feature works
41+
- [ ] New and existing unit tests pass locally with my changes
42+
- [ ] I have updated CHANGELOG.md with my changes
43+
44+
## Additional Notes
45+
<!-- Any additional information that reviewers should know -->

0 commit comments

Comments
 (0)