Skip to content

Add QGIS plugin publish workflow - #12

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

Add QGIS plugin publish workflow#12
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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an automated publishing pipeline for this QGIS plugin template, enabling GitHub Releases (and manual dispatch) to build a distributable zip, validate its version, attach the artifact to the release, and upload it to the official QGIS plugin repository.

Changes:

  • Added a GitHub Actions Publish workflow triggered by release.published and workflow_dispatch.
  • Implemented a standalone XML-RPC upload helper script for plugins.qgis.org.
  • Added version validation to ensure metadata.txt matches the release tag before publishing.

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 for publishing the built plugin zip to plugins.qgis.org.
.github/workflows/publish.yml New release/manual workflow to build the zip, verify version vs tag, attach to release, and upload to QGIS plugin repo.

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

Comment on lines +25 to +33
steps:
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Build plugin zip
run: python "package_plugin.py" --source "$PLUGIN_DIR" --name "$PLUGIN_NAME" --output "$ZIP_PATH"
Comment on lines +31 to +37
endpoint = REPO_URL_TEMPLATE.format(
user=quote(username, safe=""),
password=quote(password, safe=""),
)
server = ServerProxy(endpoint, verbose=False)
plugin_id, version_id = server.plugin.upload(payload)
return plugin_id, version_id
Comment on lines +58 to +67
try:
plugin_id, version_id = upload(args.zip_path, username, password)
except Fault as exc:
print(
f"Upload failed: {exc.faultString} (code {exc.faultCode})", file=sys.stderr
)
return 1
except ProtocolError as exc:
print(f"Upload failed: HTTP {exc.errcode} {exc.errmsg}", file=sys.stderr)
return 1
@giswqs
giswqs merged commit f46c311 into main May 9, 2026
17 checks passed
@giswqs
giswqs deleted the publish-qgis-release-workflow-20260509 branch May 9, 2026 17:08
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