Packaging and deployment
Packaging
This plugin is using the qgis-plugin-ci tool to perform packaging operations.
Under the hood, the package command is performing a git archive run based on CHANGELOG.md.
Install additional dependencies:
python -m pip install -U -r requirements/packaging.txt
Then use it:
# package a specific version
qgis-plugin-ci package 1.3.1
# package latest version
qgis-plugin-ci package latest
Release a version
Everything is done through the continuous deployment, sticking to a classic git workflow: 1 released version = 1 git tag.
Here comes the process for a tag X.y.z (which has to be SemVer compliant):
Add the new version to the
CHANGELOG.md.You can write it manually or use the auto-generated release notes by Github:Go to project’s releases and click on
Draft a new releaseIn
Choose a tag, enter the new tagClick on
Generate release notesCopy/paste the generated text from
## What's changeduntil the line before**Full changelog**:...in the CHANGELOG.md replacingWhat's changedwith the tag and the publication date.
Optionally change the version number in
metadata.txt. It’s recommended to use the next version number with-DEVsuffix (e.g.1.4.0-DEVwhenX.y.zis1.3.0) to avoid confusion during the development phase.Apply a git tag with the relevant version:
git tag -a X.y.z {git commit hash} -m "This version rocks!"Push tag to main branch:
git push origin X.y.zorgit push --tagsif you want to push all tags at once.The CI/CD pipeline will be triggered and will create a new release on your Git repository and publish it to the official QGIS plugins repository (if you picked up the option).
If things go wrong (failed CI/CD pipeline, missed step…), here comes the fix process:
git tag -d old
git push origin :refs/tags/old
git push --tags
And try again!