Skip to content

Release of 1.20.0

Release of 1.20.0 #34

Workflow file for this run

name: 🚀 Release
on:
push:
tags:
- '*'
branches:
- master
pull_request:
branches:
- master
paths:
- 'cadastre/**'
jobs:
package-commit:
name: Package commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# To fetch tags
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: "pip"
cache-dependency-path: "requirements/packaging.txt"
- name: Install Python requirements
run: pip install -r requirements/packaging.txt
- name: Set env
run: |
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "VERSION=$(echo ${TAG} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')-alpha" >> $GITHUB_ENV
- name: Package
run: >-
qgis-plugin-ci
package ${{ env.VERSION }}
- name: Unzip
run: unzip cadastre.${{ env.VERSION }}.zip -d tmp
- uses: actions/upload-artifact@v4
with:
name: cadastre.${{ env.VERSION }}
path: tmp
package-release:
runs-on: ubuntu-latest
if: github.repository_owner == '3liz' && contains(github.ref, 'refs/tags/')
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/cache@v4.0.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/packaging.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install qgis-plugin-ci
run: pip3 install -r requirements/packaging.txt
- name : Get current changelog
run: qgis-plugin-ci changelog ${{ env.RELEASE_VERSION }} >> release.md
- name: Create release on GitHub
uses: ncipollo/release-action@v1.14.0
with:
bodyFile: release.md
token: ${{ secrets.BOT_HUB_TOKEN }}
- name: Deploy plugin
run: >-
qgis-plugin-ci
release ${{ env.RELEASE_VERSION }}
--github-token ${{ secrets.BOT_HUB_TOKEN }}
--osgeo-username ${{ secrets.OSGEO_USERNAME }}
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}
--create-plugin-repo
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.BOT_HUB_TOKEN }}
repository: 3liz/3liz.github.io
event-type: merge-plugins
client-payload: '{"name": "cadastre", "version": "${{ env.RELEASE_VERSION }}", "url": "https://github.com/3liz/QgisCadastrePlugin/releases/latest/download/plugins.xml"}'