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
* add more details around installing on virtualenv or conda environments
* add instructions to run the pyscript command in dev
* add section about how to create a new release
* add section about how the release process works
* fix mispellings (enviroment and avaible)
* pin the python version when creating the dev environment
* add note on how to build the package whell locally
│ create Create a new pyscript project with the passed in name, creating a new directory in the current directory. Alternatively, use `--wrap` so as to embed a │
75
+
│ python file instead. │
76
+
│ run Creates a local server to run the app on the path and port specified. │
To create a new release of pyscript-cli, follow these steps:
131
+
132
+
1. Update the version number in `src/pyscript/version`
133
+
134
+
2. Update CHANGELOG.md with the changes since the last release
135
+
136
+
3. Create a new git tag matching the version number:
137
+
```shell
138
+
git tag X.Y.Z
139
+
```
140
+
141
+
4. Push the tag to GitHub:
142
+
```shell
143
+
git push origin X.Y.Z
144
+
```
145
+
146
+
5. The GitHub Actions workflow will automatically:
147
+
- Verify the tag matches the version in `src/pyscript/version`
148
+
- Run tests
149
+
- Build and publish the package to PyPI
150
+
- Create a GitHub release
151
+
152
+
6. Verify the new version is available on PyPI: https://pypi.org/project/pyscript-cli/
153
+
154
+
Note: Make sure all tests pass locally before creating a new release. The release workflow will fail if there are any test failures or version mismatches.
155
+
156
+
Note 2: The version number in `src/pyscript/version` and the tag pushed to git (`X.Y.Z` in the example above) MUST MATCH! If they don't match the, the
157
+
action to create and publish the release won't start.
158
+
159
+
160
+
### How the Release Process Works
161
+
162
+
The release process is automated through GitHub Actions workflows. Here's what happens behind the scenes:
163
+
164
+
1. When a new tag is pushed, it triggers the release workflow
165
+
2. The workflow first checks that:
166
+
- The tag name matches the version in `src/pyscript/version`
167
+
- All tests pass successfully
168
+
169
+
3. If checks pass, the workflow:
170
+
- Builds the Python package using setuptools
171
+
- Creates source and wheel distributions
172
+
- Uploads the distributions to PyPI using twine
173
+
- Creates a GitHub release with the tag name
174
+
175
+
4. The version check is performed by the `check_tag_version()` function in setup.py, which:
176
+
- Reads the version from `src/pyscript/version`
177
+
- Compares it to the git tag that triggered the workflow
178
+
- Fails if they don't match exactly
179
+
180
+
5. The PyPI upload uses credentials stored as GitHub repository secrets
181
+
182
+
This automated process ensures consistent and reliable releases while preventing common issues like version mismatches or failed tests from being published.
183
+
184
+
NOTE: If you wanna build locally, run `CHECK_VERSION=False python -m build`. This will skip the check tag version conditions defined in `setup.py`, allowing
185
+
to create the wheel locally, without having a tag with a version matching the `src/pyscript/version` file.
0 commit comments