Merge pull request #850 from ConservationInternational/1.2.6 #384
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Creating plugin package in main branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| create-package: | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: qgis/qgis:release-3_34 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Fix Python command | |
| run: apt-get install python-is-python3 | |
| - name: Install python | |
| uses: actions/setup-python@v4 | |
| - name: Install plugin dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Get unique identifier | |
| id: get-identifier | |
| run: | | |
| echo "PACKAGE_ID=$(python -c "import uuid; print(str(uuid.uuid4())[:4])")" >> $GITHUB_OUTPUT | |
| - name: Generate zip file | |
| run: | | |
| python admin.py build --output-directory ${{ format( | |
| 'docs/plugin/package/cplus_plugin_main_{0}/cplus_plugin/', | |
| steps.get-identifier.outputs.PACKAGE_ID) }} | |
| - name: Plugin path details | |
| id: get-zip-details | |
| run: | | |
| echo "ZIP_PATH=docs/plugin/package/$(ls docs/plugin/package)" >> $GITHUB_OUTPUT | |
| echo "ZIP_NAME=$(ls docs/plugin/package)" >> $GITHUB_OUTPUT | |
| - name: Uploading plugin build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.get-zip-details.outputs.ZIP_NAME }} | |
| path: ${{ steps.get-zip-details.outputs.ZIP_PATH }} | |
| - name: Save the plugin folder name into artifact | |
| shell: bash | |
| env: | |
| ZIP_FILE_NAME: ${{ steps.get-zip-details.outputs.ZIP_NAME }} | |
| run: | | |
| echo $ZIP_FILE_NAME > zip_file_name.txt | |
| - name: Upload the zip file name | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zip_file_name | |
| path: ./zip_file_name.txt |