Package

This command is not specific to the hosting platform (GitLab, GitHub…)

Command help

usage: qgis-plugin-ci package [-h] [--transifex-token TRANSIFEX_TOKEN]
                              [-u PLUGIN_REPO_URL] [-c] [-d] [-a ASSET_PATH]
                              [--no-repository-stylesheet]
                              release_version

Positional Arguments

release_version

The version to be released

Named Arguments

--transifex-token

The Transifex API token. If specified translations will be pulled and compiled.

-u, --plugin-repo-url

If specified, a XML repository file will be created in the current directory, the zip URL will use this parameter.

-c, --allow-uncommitted-changes

If omitted, uncommitted changes are not allowed before packaging. If specified and some changes are detected, a hard reset on a stash create will be used to revert changes made by qgis-plugin-ci.

Default: False

-d, --disable-submodule-update

If omitted, a git submodule is updated. If specified, git submodules will not be updated/initialized before packaging.

Default: False

-a, --asset-path

An additional asset path to add. Can be specified multiple times.

--no-repository-stylesheet

Do not embed the XSL stylesheet reference in the generated plugins.xml.

Default: False

Additional metadata

When packaging the plugin, some extra metadata information can be added if these keys are present in the metadata.txt:

  • commitNumber= : the commit number in the branch otherwise 1 on a tag

  • commitSha1= : the commit ID

  • dateTime= : the date time in UTC format when the packaging is done

Tip

These extra parameters are specific to QGIS Plugin CI, so it’s strongly recommended storing them below a dedicated section:

[tool:qgis-plugin-ci]
commitNumber=
commitSha1=
dateTime=

Custom repository

qgis-plugin-ci package -c -u https://oslandia.gitlab.io/qgis/oslandia/ latest

Generates the following plugins.xml file:

<?xml version = '1.0' encoding = 'UTF-8'?>
<?xml-stylesheet type="text/xsl" href="plugins.xsl"?>
<plugins>
    <pyqgis_plugin name="Oslandia" version="0.20.0">
        <about><![CDATA[The Oslandia plugin that gives access to our news, ideas, fun features and exclusive support services for our end-customers right into QGIS.]]></about>
        <author_name><![CDATA[Oslandia]]></author_name>
        <create_date>2026-05-15T00:00:00+00:00</create_date>
        <deprecated>False</deprecated>
        <description><![CDATA[Official plugin for Oslandia customers]]></description>
        <download_url>https://oslandia.gitlab.io/qgis/oslandia/oslandia.0.20.0.zip</download_url>
        <experimental>True</experimental>
        <file_name>oslandia.0.20.0.zip</file_name>
        <homepage><![CDATA[https://oslandia.gitlab.io/qgis/oslandia/]]></homepage>
        <icon>resources/images/default_icon.png</icon>
        <repository><![CDATA[https://gitlab.com/Oslandia/qgis/oslandia/]]></repository>
        <qgis_maximum_version>4.10.16</qgis_maximum_version>
        <qgis_minimum_version>3.34.6</qgis_minimum_version>
        <server>False</server>
        <tags><![CDATA[Oslandia,support,maintenance,client,support,GitLab]]></tags>
        <tracker><![CDATA[https://gitlab.com/Oslandia/qgis/oslandia/-/issues]]></tracker>
        <update_date>2026-05-15T00:00:00+00:00</update_date>
        <uploaded_by><![CDATA[Oslandia]]></uploaded_by>
        <version>0.20.0</version>
    </pyqgis_plugin>
</plugins>

Since its version 2.10, it comes by default with a plugins.xsl stylesheet to make the plugins.xml human-readable. If you prefer having a raw plugins.xml, use the --no-repository-stylesheet option.

QGIS Plugin CI - Custom plugins repository with stylesheet