-
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2.38 KB
/
plugin-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: 🔌 Plugin | Package and release
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
tags:
- '*'
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
plugin-package:
name: Packages and releases plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Qt lrelease
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qttools5-dev-tools
- name: Install qgis-plugin-ci
run: pip install qgis-plugin-ci>=2.8.6
- name: 🌍 Push translations
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }}
run: qgis-plugin-ci push-translation ${{ secrets.TX_TOKEN }}
- name: copy licence
run: cp LICENSE pg_service_parser/LICENSE
- name: Install pgservice parser
run: |
pip download -r requirements.txt --only-binary :all: -d temp/
unzip -o "temp/*.whl" -d pg_service_parser/libs
rm -r temp
# set write rights to group (because qgis-plugin-ci needs it)
chmod -R g+w pg_service_parser/libs
- name: Package
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
run: |
VERSION=0.0.0
qgis-plugin-ci package ${VERSION} \
--allow-uncommitted-changes \
--asset-path pg_service_parser/libs \
--transifex-token "${{ secrets.TX_TOKEN }}"
- uses: actions/upload-artifact@v4
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
with:
name: pg_service_parser_dev
path: pg_service_parser.0.0.0.zip
if-no-files-found: error
- name: Release
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${{ github.ref_name }}
qgis-plugin-ci release ${VERSION} \
--allow-uncommitted-changes \
--asset-path pg_service_parser/libs \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--osgeo-username ${{ secrets.OSGEO_PLUGIN_USERNAME }} \
--osgeo-password ${{ secrets.OSGEO_PLUGIN_PASSWORD }} \
--transifex-token "${{ secrets.TX_TOKEN }}"