Skip to content

Create buildandpublish.yml #1

Create buildandpublish.yml

Create buildandpublish.yml #1

name: Package and Publish QGIS Plugin
on:
push:
branches:
- main # Change to the name of your default branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set Up Python
uses: actions/setup-python@v2
with:
python-version: 3.9 # Choose the Python version your plugin requires
- name: Install QGIS Plugin Builder
run: pip install qgis-plugin-builder
- name: Build QGIS Plugin
run: qgis-plugin-builder package
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: dist/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Release
run: |
echo "Uploaded release with id ${{ steps.create_release.outputs.id }}"
# You can add more release-specific actions here
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}