Skip to content

Commit bebd3af

Browse files
committed
ci
1 parent 8a66e55 commit bebd3af

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-**
8+
pull_request:
9+
branches:
10+
- '**'
11+
release:
12+
types: [released]
13+
14+
jobs:
15+
# test:
16+
# runs-on: ubuntu-22.04
17+
# strategy:
18+
# fail-fast: false # keep for now, since 3.28 have different bases than 3.34+
19+
# matrix:
20+
# qgis_version: ['release-3_28', '3.34', '3.40', 'latest']
21+
# env:
22+
# QGIS_TEST_VERSION: ${{ matrix.qgis_version }}
23+
# steps:
24+
# - name: Checkout
25+
# uses: actions/checkout@v2
26+
# with:
27+
# submodules: recursive
28+
# - name: Package PyPI Packages
29+
# run: |
30+
# sudo ./scripts/package_pip_packages.sh
31+
# - name: Test on QGIS
32+
# run: docker compose -f .docker/docker-compose.yml run -e "PGHOST=postgres" qgis /usr/src/.docker/run-docker-tests.sh
33+
34+
release:
35+
runs-on: ubuntu-22.04
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_REF: ${{ github.ref }}
39+
if: ${{ github.event_name == 'release' }}
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
with:
44+
submodules: recursive
45+
- name: Install dependencies
46+
run: |
47+
sudo apt update && sudo apt install qtbase5-dev qttools5-dev-tools
48+
sudo pip install qgis-plugin-ci
49+
- name: Release
50+
run: |
51+
qgis-plugin-ci release ${GITHUB_REF##*/}
52+
- name: Get version number
53+
id: v
54+
run: |
55+
export VERSION_NUMBER=${GITHUB_REF/refs\/tags\/}
56+
echo $VERSION_NUMBER > VERSION
57+
echo "::set-output name=VERSION::${VERSION_NUMBER}"
58+
- name: 🚀 Upload Release Asset
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ github.event.release.upload_url }}
64+
asset_path: urkataster_tools.${{ steps.v.outputs.VERSION }}.zip
65+
asset_name: urkataster_tools.${{ steps.v.outputs.VERSION }}.zip
66+
asset_content_type: application/zip

.github/workflows/pre-commit.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: pre-commit/action@v3.0.1

0 commit comments

Comments
 (0)