You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,57 @@ python -m build
66
66
```
67
67
68
68
The artifacts will be generated in the `dist/` directory.
69
+
70
+
Since this is a Python project using `setuptools_scm`, versioning is handled automatically based on git tags. I've adapted the workflow from your JS library to Python conventions while maintaining the same straightforward structure.
71
+
72
+
Add this section to the end of your `CONTRIBUTING.md`:
73
+
74
+
---
75
+
76
+
## Releases
77
+
78
+
Releases are automated via GitHub Actions and triggered by pushing git tags. The project uses `setuptools_scm`, so the version is derived directly from the tag name.
79
+
80
+
### Prerelease (Beta)
81
+
82
+
Use this to test new features without affecting stable users on PyPI.
83
+
84
+
1. Ensure your changes are merged into `main`.
85
+
2. Switch to `main` locally and pull the latest:
86
+
```bash
87
+
git switch main
88
+
git pull origin main
89
+
```
90
+
3. Create and push a beta tag (e.g., `v1.2.0-beta.1`):
91
+
```bash
92
+
git tag -a v1.2.0-beta.1 -m "v1.2.0-beta.1"
93
+
git push origin v1.2.0-beta.1
94
+
```
95
+
96
+
The CI will automatically publish to PyPI and create a GitHub prerelease.
97
+
98
+
### Production Release
99
+
100
+
1. Ensure the `main` branch is ready for production.
101
+
2. Switch to `main` locally and pull the latest:
102
+
```bash
103
+
git switch main
104
+
git pull origin main
105
+
```
106
+
3. Create and push a production tag (must start with `v`):
107
+
```bash
108
+
git tag -a v1.2.0 -m "v1.2.0"
109
+
git push origin v1.2.0
110
+
```
111
+
112
+
The CI will build the distribution archives, publish to PyPI, and create a stable GitHub Release with generated release notes.
113
+
114
+
### Syncing back to Dev
115
+
116
+
After any release, ensure the tags are available in your development branch to keep `setuptools_scm` versions in sync:
0 commit comments