This section documents the steps to make a release of docstub. Depending on the release type not all steps may be mandatory – use appropriate judgement.
Generate a read-only GitHub token, install changelist, and generate a first draft of the release notes with it.
pip install changelist
RELEASE_TAG=...
PREV_TAG=...
export GH_TOKEN=...
changelist scientific-python/docstub \
--version "${RELEASE_TAG}" \
--out "doc/release_notes/v${RELEASE_TAG}.md" \
"${PREV_TAG}" mainRELEASE_TAGis the tag of the current release (for examplev1.1.0)PREV_TAGis the tag of the previous release (for examplev1.0.0).
So changelist will generate notes based on the changes between ${PREV_TAG}..main.
Review and update doc/release_notes/v${RELEASE_TAG}.md.
Don't forget to add the new document to doc/release_notes/index.md.
Create a pull request with the new release notes. If desired, include this pull request in the release notes, too.
Once the pull request with the release notes is merged, tag the resulting commit with the desired version tag. This should be a signed tag.
git tag --sign "v${RELEASE_TAG}"Include the release notes in the tag's message in the same formatting style as other release tags.
Review and then push the tag:
git push origin "v${RELEASE_TAG}"Login to https://app.readthedocs.org/projects/docstub.
Create a new version for the tag corresponding to the new release.
Trigger docstub's release workflow on GitHub. As a security measure, this workflow needs to be approved by one eligible maintainer. If successful, the workflow will build the package and push it to PyPI.
Create a new release draft and copy the content of doc/release_notes/v${RELEASE_TAG}.md into it.
(Remove the duplicate level 1 headline in the first line.)
Review and publish.