Skip to content

release test

release test #27

Workflow file for this run

name: Release 🚀
env:
PROJECT_FOLDER: "menu_from_project"
PYTHON_VERSION: 3.8
on:
push:
tags:
- '*'
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Install Qt lrelease
# run: sudo apt install qt5-default qttools5-dev-tools
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '${{ env.PYTHON_VERSION }}'
- name: Install project requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U 'qgis-plugin-ci>=2.2,<2.8'
- id: get-myversion
run: |
echo "myversion=$(echo ${{ github.ref }} | cut -dv -f2)" >> "$GITHUB_ENV"
# echo "::set-output name=myversion::$myversion"
# echo "name=myversion::$myversion" >> $GITHUB_OUTPUT
# - run: echo "${{steps.get-myversion.outputs.myversion}}"
- run: echo ${{ env.myversion }}
- name: Package the version
run: |
qgis-plugin-ci package ${{ env.myversion }}
- name : Get current changelog for ${{ github.ref }}
run: qgis-plugin-ci changelog ${{ env.myversion }} >> release.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: release.md
- name: upload plugin artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.PROJECT_FOLDER }}.${{ env.myversion }}.zip
asset_name: ${{ env.PROJECT_FOLDER }}-${{ env.myversion }}.zip
asset_content_type: application/zip
- name: Deploy plugin to QGIS official repository and as release asset
run: >-
qgis-plugin-ci
release v${{ env.myversion }}
--github-token ${{ secrets.GITHUB_TOKEN }}
--osgeo-username ${{ secrets.OSGEO_USER }}
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}