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 release
In
Choose a tag
, enter the new tagClick on
Generate release notes
Copy/paste the generated text from
## What's changed
until the line before**Full changelog**:...
in the CHANGELOG.md replacingWhat's changed
with the tag and the publication date.
Optionally change the version number in
metadata.txt
. It’s recommended to use the next version number with-DEV
suffix (e.g.1.4.0-DEV
whenX.y.z
is1.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.z
orgit push --tags
if 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!