-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (63 loc) · 2.17 KB
/
release.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Create a release
on:
push:
tags:
- "v*"
env:
TZ: UTC
jobs:
create-release:
runs-on: ubuntu-22.04
container:
image: qgis/qgis:ltr
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: fix Python command
run: apt-get install python-is-python3
- name: Install poetry
uses: Gr1N/setup-poetry@v9
- name: Install pluginadmin dependencies
run: poetry install --without gdal --with pyqt
- name: Get experimental info
id: get-experimental
run: |
echo "::set-output name=IS_EXPERIMENTAL::$(poetry run python -c "import toml; data=toml.load('pyproject.toml'); print(data['tool']['qgis-plugin']['metadata']['experimental'].lower())")"
- name: generate zip
run: poetry run pluginadmin generate-zip
- name: get zip details
id: get-zip-details
run: |
echo "::set-output name=ZIP_PATH::dist/$(ls dist)\n"
echo "::set-output name=ZIP_NAME::$(ls dist)"
- name: create release from tag
id: create-release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
prerelease: ${{ steps.get-experimental.outputs.IS_EXPERIMENTAL }}
body_path: ${{ github.workspace }}/CHANGELOG.md
draft: false
files: ${{ steps.get-zip-details.outputs.ZIP_PATH }}
token: ${{ github.token }}
update-docs:
needs: create-release
runs-on: ubuntu-22.04
container:
image: qgis/qgis:ltr
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: set safe directory
run: git config --global --add safe.directory /__w/qgisconefor/qgisconefor
- name: fix Python command
run: apt-get install python-is-python3
- name: Install poetry
uses: Gr1N/setup-poetry@v9
- name: Install pluginadmin dependencies
run: poetry install --without gdal
- name: generate plugin repo XML
run: poetry run pluginadmin --verbose generate-plugin-repo-xml
- name: update docs
run: poetry run mkdocs gh-deploy --force