Package: qgis-plugin-ci
QGIS Plugin CIContains scripts to perform automated testing and deployment for QGIS plugins.
These scripts are written for and tested on GitHub, Travis-CI, github workflows and Transifex.Deploy plugin releases on QGIS official plugin repositoryPublish plugin in Github releases, option to deploy a custom repositoryEasily integrated in Travis-CI or github workflowsCompletely handle translations with Transifex:create the project and the languagespull and push translationsall TS/QM files can be managed on the CI, thei18nfolder can be omitted from the Git repositorychangelogsection in the metadata.txt can be populated if the CHANGELOG.md is presentset theexperimentalflag according to the tag if needed:book: For further information, seethe documentation.QGIS-Plugin-CI is best served if you use these two conventions :Semantic versioningKeep A ChangelogCommand lineusage: qgis-plugin-ci [-h] [-v]
                      {package,changelog,release,pull-translation,push-translation}
                      ...

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         print the version and exit

commands:
  qgis-plugin-ci command

  {package,changelog,release,pull-translation,push-translation}
    package             creates an archive of the plugin
    changelog           gets the changelog content
    release             release the plugin
    pull-translation    pull translations from Transifex
    push-translation    update strings and push translationsRequirementsThe code is under agitrepository (git archiveis used to bundle the plugin).There is no uncommitted changes when doing a package/release (althought there is an option to bypass this requirement).A configuration at the top directory either in.qgis-plugin-cior insetup.cfgorpyproject.tomlwith a[qgis-plugin-ci]section (seedocs/configuration/options.mdfor details).The source files of the plugin are within a sub-directory  with ametadata.txtfile with the following fields:descriptionqgisMinimumVersionrepositorytrackerSeeparameters.pyfor more parameters and details. Notice that the name of this directory will be used for the zip file.QRC and UI filesAny .qrc file in the source top directory (plugin_path) will be compiled and output as filename_rc.py. You can then import it usingimport plugin_path.resources_rcCurrently, qgis-plugin-ci does not compile any .ui file.Publishing pluginsWhen releasing, you can publish the plugin :In the official QGIS plugin repository. You need to provide user name and password for your Osgeo account.As a custom repository in Github releases and which can be added later in QGIS. The address will be:https://github.com/__ORG__/__REPO__/releases/latest/download/plugins.xmlBoth can be achieved in the same process.Pre-release and experimentalIn the case of a pre-release (either from the tag name according toSemantic Versioningor from the GitHub release), the plugin will be flagged as experimental.The tool will recognise any label use as a suffix to flag it as pre-release :10.1.0-beta13.4.0-rc.2DebugIn any Python module, you can have a global variable asDEBUG = True, which will be changed toFalsewhen packaging the plugin.Other toolsQGIS-Plugin-RepoQGIS-Plugin-CI can generate theplugins.xmlfile, per plugin.
If you want to merge many XML files into one to have a single QGIS plugin repository providing many plugins,
you should checkQGIS-Plugin-Repo.
It's designed to run on CI after QGIS-Plugin-CI.