Release process¶
Branches¶
| Branch | Role |
|---|---|
develop |
Default branch. All pull requests go here. |
main |
The latest release. Only the release workflow moves it, by a fast-forward to the released commit. |
| feature branches | One per change, deleted after the merge. |
The branch and tag rules are GitHub rulesets, stored as JSON in .github/rulesets/:
develop.json: no deletion and no force push, linear history, changes only by pull request with resolved review threads, merge by squash or rebase, and the required status checkstests,format,lint,pythonanddocs.main.json: no deletion, no force push, linear history.tags.json: tags cannot be deleted or moved.
.github/rulesets/apply.sh applies the rulesets and the merge settings of the
repository (squash and rebase merges, no merge commits, auto-merge, updating pull request
branches, deletion of merged branches) with the GitHub CLI. It needs admin rights on the repository and updates
existing rulesets. A change of the JSON files takes effect only after apply.sh is run
again:
Versions and release notes¶
The version in pom.xml on develop is always the next release, without a -SNAPSHOT
suffix. After a release, a pull request starts the development of the next version: it
sets the version in pom.xml, for example 0.7.0, and adds the release notes
release-notes/<version>.md, for example release-notes/0.7.0.md. Every pull request
with a user visible change adds its note to this file. The release notes are the text of
the GitHub release and appear on the Release notes page, the notes
of the version in development included.
Release a version¶
- Open a pull request that completes the release notes
release-notes/<version>.mdand updates the documentation, and merge it intodevelop. -
Tag the merged commit on
developand push the tag: -
The workflow
.github/workflows/release.ymlruns for the tag. It checks thatrelease-notes/<version>.mdexists, builds and tests the app and its javadoc with./mvnw -Pjavadoc verify, checks thattarget/cy3sbml-<version>.jarandtarget/cy3sbml-<version>-javadoc.jarexist, creates the GitHub release with the app jar, the javadoc jar and thepom.xmlof the release, each with its MD5 and SHA-1 checksum, and fast-forwardsmainto the tag. The build runs without a dependency cache and with read access only; the jobs that create the release and movemainrun no build code. - Upload the jar of the GitHub release to the Cytoscape App Store.
- Open the pull request that starts the development of the next version.
The documentation is published from develop by the workflow
.github/workflows/docs.yml to https://matthiaskoenig.github.io/cy3sbml/.
Python package¶
The Python package in python/ has its own version and release tags.
For the first release, create the pypi environment in GitHub and allow
deployment from tags matching python-v*. Register a
pending Trusted Publisher
under the PyPI account that will own the project:
| Setting | Value |
|---|---|
| PyPI project name | cy3sbml |
| GitHub owner | matthiaskoenig |
| Repository | cy3sbml |
| Workflow filename | python-release.yml |
| Environment | pypi |
PyPI converts the pending publisher into a project publisher when the first upload succeeds.
- Set the
versioninpython/pyproject.tomland refresh the lockfiles withuv lock --project pythonanduv lock --project examples/python. Merge the release changes intodevelop. -
Tag the merged commit and push the tag. For example, for version 0.1.0:
-
python-release.ymlchecks the version and runs the offline tests. It builds and validates the source distribution and wheel, then publishes both to PyPI with Trusted Publishing.