|
| 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 |
0 commit comments