Skip to content

Merge pull request #73 from teksi/3nids-patch-1 #125

Merge pull request #73 from teksi/3nids-patch-1

Merge pull request #73 from teksi/3nids-patch-1 #125

name: 🔌 Plugin | Package and release
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
tags:
- '*'
branches:
- main
pull_request:
branches:
- main
paths:
- teksi_module_management_tool/**
- scripts/package-pip-packages.sh
- .github/workflows/plugin-package.yml
- requirements.txt
workflow_dispatch:
jobs:
plugin-package:
name: Packages and releases plugin
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Qt lrelease
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qttools5-dev-tools
- name: Install qgis-plugin-ci
run: pip install qgis-plugin-ci>=2.8.6
- name: 🌍 Push translations
if: ${{ github.event_name == 'push' }}
run: qgis-plugin-ci push-translation ${{ secrets.TX_TOKEN }}
- name: Package PyPI Packages
run: ./scripts/package-pip-packages.sh
- name: Package
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
run: |
VERSION=0.0.0
qgis-plugin-ci -v package ${VERSION} \
--allow-uncommitted-changes \
--asset-path teksi_module_management_tool/libs \
# --transifex-token "${{ secrets.TX_TOKEN }}"
- name: Upload artifact for PR testing
id: upload-artifact
uses: actions/upload-artifact@v6
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
with:
name: teksi_module_management_tool_dev
path: teksi_module_management_tool.0.0.0.zip
if-no-files-found: error
- name: Comment on PR with artifact link
if: github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: plugin-artifact
message: |
## 🔌 Plugin Artifact
A development build of the plugin is available for testing:
**[⬇️ Download teksi_module_management_tool_dev.zip](${{ steps.upload-artifact.outputs.artifact-url }})**
> ⚠️ This is a development build from commit ${{ github.event.pull_request.head.sha }}.
- name: Release
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${{ github.ref_name }}
qgis-plugin-ci --no-validation release ${VERSION} \
--allow-uncommitted-changes \
--asset-path teksi_module_management_tool/libs \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--qgis-token ${{ secrets.QGIS_ORG_TOKEN }}