-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (49 loc) · 1.72 KB
/
push_package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 "::set-output name=PACKAGE_ID::$(python -c "import uuid; print(str(uuid.uuid4())[:4])")"
- 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 "::set-output name=ZIP_PATH::docs/plugin/package/$(ls docs/plugin/package)\n"
echo "::set-output name=ZIP_NAME::$(ls docs/plugin/package)"
- name: Uploading plugin build
uses: actions/upload-artifact@v3
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@v3
with:
name: zip_file_name
path: ./zip_file_name.txt