Skip to content

Add QGIS plugin publish workflow#90

Merged
giswqs merged 1 commit into
mainfrom
publish-qgis-release-workflow-20260509
May 9, 2026
Merged

Add QGIS plugin publish workflow#90
giswqs merged 1 commit into
mainfrom
publish-qgis-release-workflow-20260509

Conversation

@giswqs

@giswqs giswqs commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a release/workflow_dispatch publish workflow for QGIS plugin releases.
  • Build the plugin zip, verify the metadata version matches the release tag, attach the zip to the GitHub release, and upload it to plugins.qgis.org.
  • Add the shared plugins.qgis.org XML-RPC upload helper.

Validation

  • Ran the local package command used by the workflow.
  • Verified the generated zip contains metadata.txt and __init__.py under the expected plugin root.

Copilot AI review requested due to automatic review settings May 9, 2026 17:00
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request May 9, 2026 17:01 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an automated publishing pipeline for the OpenGeoAgent QGIS plugin, including a helper script to upload the packaged plugin zip to plugins.qgis.org via XML-RPC.

Changes:

  • Added a GitHub Actions Publish workflow to build the plugin zip, validate metadata.txt version against the release tag, attach the artifact to the GitHub release, and upload to plugins.qgis.org.
  • Added a Python helper script to upload the plugin zip to plugins.qgis.org using the XML-RPC plugin.upload endpoint.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scripts/upload_to_qgis_plugin_repo.py New XML-RPC uploader script for pushing the packaged plugin zip to plugins.qgis.org.
.github/workflows/publish.yml New release/workflow_dispatch publishing workflow to package, validate, attach, and upload the QGIS plugin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +35
import os
import sys
from urllib.parse import quote
from xmlrpc.client import Binary, Fault, ProtocolError, ServerProxy

REPO_URL_TEMPLATE = "https://{user}:{password}@plugins.qgis.org/plugins/RPC2/"


def upload(zip_path: str, username: str, password: str) -> tuple[int, int]:
"""Upload the given zip to plugins.qgis.org and return ``(plugin_id, version_id)``."""
with open(zip_path, "rb") as fh:
payload = Binary(fh.read())

endpoint = REPO_URL_TEMPLATE.format(
user=quote(username, safe=""),
password=quote(password, safe=""),
)
server = ServerProxy(endpoint, verbose=False)
return 1
except ProtocolError as exc:
print(f"Upload failed: HTTP {exc.errcode} {exc.errmsg}", file=sys.stderr)
return 1
PLUGIN_NAME: open_geoagent
ZIP_PATH: dist/open_geoagent.zip
steps:
- uses: actions/checkout@v6
@giswqs giswqs merged commit d93ee63 into main May 9, 2026
13 checks passed
@giswqs giswqs deleted the publish-qgis-release-workflow-20260509 branch May 9, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants