From 7c526d8b27e0b4739cdf47bea12526aa01089e73 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 07:47:14 +0100 Subject: [PATCH 01/84] Erste von claude.ai erstellte Version --- .gitea/workflows/release.yml | 100 +++++++++++++++++++++++++++++++---- metadata.txt | 26 ++++----- 2 files changed, 98 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 99707a6..7145972 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,20 +1,98 @@ -name: Build custom release zip +name: Release Plugin on: push: tags: - - '*' # läuft bei jedem neuen Tag + - 'v*' + branches: + - feature/release # Zum Testen: auch bei Branch-Push auslösen jobs: - build-release: - runs-on: docker + release: + runs-on: alpine-latest steps: - # 1. Repository auschecken - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - # 2. ZIP-Datei mit ausgewählten Dateien/Ordnern erstellen - - name: Create custom zip + - name: Install dependencies + run: apk add --no-cache zip curl + + - name: Determine channel from tag + id: channel run: | - apk add zip - zip -r my-release-${GITEA_REF_NAME}.zip src/ docs/ README.md \ No newline at end of file + # Bei Branch-Push (kein Tag): dev als Default + TAG="${{ github.ref_name }}" + if [[ "$TAG" =~ -dev ]]; then + echo "channel=dev" >> $GITHUB_OUTPUT + echo "version=$TAG" >> $GITHUB_OUTPUT + elif [[ "$TAG" =~ -beta ]]; then + echo "channel=beta" >> $GITHUB_OUTPUT + echo "version=$TAG" >> $GITHUB_OUTPUT + elif [[ "$TAG" =~ ^v[0-9] ]]; then + echo "channel=stable" >> $GITHUB_OUTPUT + echo "version=$TAG" >> $GITHUB_OUTPUT + else + # Branch-Push ohne Tag → dev-Build + echo "channel=dev" >> $GITHUB_OUTPUT + echo "version=dev-$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT + fi + + - name: Build plugin ZIP + run: | + PLUGIN_NAME="Plugin_Test_Action" + VERSION="${{ steps.channel.outputs.version }}" + mkdir -p dist + zip -r dist/${PLUGIN_NAME}-${VERSION}.zip \ + ${PLUGIN_NAME}/ \ + -x "*.pyc" -x "*/__pycache__/*" + echo "ZIP_PATH=dist/${PLUGIN_NAME}-${VERSION}.zip" >> $GITHUB_ENV + echo "PLUGIN_NAME=${PLUGIN_NAME}" >> $GITHUB_ENV + echo "VERSION=${VERSION}" >> $GITHUB_ENV + + - name: Create Gitea Release + id: create_release + run: | + IS_PRERELEASE=true + [[ "${{ steps.channel.outputs.channel }}" == "stable" ]] && IS_PRERELEASE=false + + RESPONSE=$(curl -s -X POST \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Content-Type: application/json" \ + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases" \ + -d "{ + \"tag_name\": \"${VERSION}\", + \"name\": \"Release ${VERSION}\", + \"prerelease\": ${IS_PRERELEASE} + }") + echo "RELEASE_ID=$(echo $RESPONSE | grep -o '\"id\":[0-9]*' | head -1 | cut -d: -f2)" >> $GITHUB_ENV + + - name: Upload ZIP asset + run: | + curl -s -X POST \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Content-Type: application/zip" \ + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets?name=$(basename ${ZIP_PATH})" \ + --data-binary @${ZIP_PATH} + + - name: Get asset download URL + run: | + ASSETS=$(curl -s \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets") + DOWNLOAD_URL=$(echo $ASSETS | grep -o '"browser_download_url":"[^"]*' | head -1 | cut -d'"' -f4) + echo "DOWNLOAD_URL=${DOWNLOAD_URL}" >> $GITHUB_ENV + + - name: Trigger Repository update + run: | + curl -s -X POST \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Content-Type: application/json" \ + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ + -d "{ + \"type\": \"plugin-released\", + \"payload\": { + \"plugin\": \"${PLUGIN_NAME}\", + \"version\": \"${VERSION}\", + \"channel\": \"${{ steps.channel.outputs.channel }}\", + \"download_url\": \"${DOWNLOAD_URL}\" + } + }" \ No newline at end of file diff --git a/metadata.txt b/metadata.txt index 47af179..0fac9f7 100644 --- a/metadata.txt +++ b/metadata.txt @@ -1,21 +1,13 @@ [general] -name=LNO Sachsen | Basisfunktionen +name=LNO Sachsen | Plugin Test Action qgisMinimumVersion=3.0 -description=Dieses Plugin ist ein Test -version=25.10.3 +qgisMaximumVersion=3.99 +description=Test plugin for release pipeline +version=26.3.1 author=Michael Otto email=michael.otto@landkreis-mittelsachsen.de - -about=Provide a brief description of the plugin and its purpose. - -hasProcessingProvider=no -tags=python - -category=Plugins -icon=icon.png -experimental=True - -deprecated=False - -server=False - +homepage=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action +tracker=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/issues +repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action +experimental=False +deprecated=False \ No newline at end of file From 60d792cdb153269ff1b25e2f6157e1677567c551 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 09:10:52 +0100 Subject: [PATCH 02/84] Zweite von claude.ai erstellte Version --- .gitea/workflows/release.yml | 152 ++++++++++++++++++++++++++--------- .gitignore | 1 + .plugin/changelog.txt | 5 ++ .plugin/plugin.cfg | 14 ++++ 4 files changed, 132 insertions(+), 40 deletions(-) create mode 100644 .plugin/changelog.txt create mode 100644 .plugin/plugin.cfg diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7145972..383c1a9 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -4,8 +4,6 @@ on: push: tags: - 'v*' - branches: - - feature/release # Zum Testen: auch bei Branch-Push auslösen jobs: release: @@ -16,72 +14,147 @@ jobs: - name: Install dependencies run: apk add --no-cache zip curl - - name: Determine channel from tag - id: channel + - name: Determine version and channel + id: info run: | - # Bei Branch-Push (kein Tag): dev als Default TAG="${{ github.ref_name }}" + VERSION="${TAG#v}" + if [[ "$TAG" =~ -dev ]]; then - echo "channel=dev" >> $GITHUB_OUTPUT - echo "version=$TAG" >> $GITHUB_OUTPUT + CHANNEL="dev" elif [[ "$TAG" =~ -beta ]]; then - echo "channel=beta" >> $GITHUB_OUTPUT - echo "version=$TAG" >> $GITHUB_OUTPUT - elif [[ "$TAG" =~ ^v[0-9] ]]; then - echo "channel=stable" >> $GITHUB_OUTPUT - echo "version=$TAG" >> $GITHUB_OUTPUT + CHANNEL="beta" else - # Branch-Push ohne Tag → dev-Build - echo "channel=dev" >> $GITHUB_OUTPUT - echo "version=dev-$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT + CHANNEL="stable" fi + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + + - name: Read plugin.cfg + id: cfg + run: | + CFG=".plugin/plugin.cfg" + + get_value() { + grep -i "^$1" "$CFG" | head -1 | cut -d= -f2- | tr -d '\r' | xargs + } + + echo "zip_folder=$(get_value zip_folder)" >> $GITHUB_OUTPUT + echo "name=$(get_value name)" >> $GITHUB_OUTPUT + echo "qgis_min=$(get_value qgisMinimumVersion)" >> $GITHUB_OUTPUT + echo "qgis_max=$(get_value qgisMaximumVersion)" >> $GITHUB_OUTPUT + echo "description=$(get_value description)" >> $GITHUB_OUTPUT + echo "author=$(get_value author)" >> $GITHUB_OUTPUT + echo "email=$(get_value email)" >> $GITHUB_OUTPUT + echo "homepage=$(get_value homepage)" >> $GITHUB_OUTPUT + echo "tracker=$(get_value tracker)" >> $GITHUB_OUTPUT + echo "repository=$(get_value repository)" >> $GITHUB_OUTPUT + echo "experimental=$(get_value experimental)" >> $GITHUB_OUTPUT + echo "deprecated=$(get_value deprecated)" >> $GITHUB_OUTPUT + + - name: Generate metadata.txt + run: | + VERSION="${{ steps.info.outputs.version }}" + CHANGELOG=$(cat .plugin/changelog.txt) + + cat > metadata.txt << EOF + [general] + name=${{ steps.cfg.outputs.name }} + version=${VERSION} + qgisMinimumVersion=${{ steps.cfg.outputs.qgis_min }} + qgisMaximumVersion=${{ steps.cfg.outputs.qgis_max }} + description=${{ steps.cfg.outputs.description }} + author=${{ steps.cfg.outputs.author }} + email=${{ steps.cfg.outputs.email }} + homepage=${{ steps.cfg.outputs.homepage }} + tracker=${{ steps.cfg.outputs.tracker }} + repository=${{ steps.cfg.outputs.repository }} + experimental=${{ steps.cfg.outputs.experimental }} + deprecated=${{ steps.cfg.outputs.deprecated }} + changelog=${VERSION} + $(cat .plugin/changelog.txt) + EOF + - name: Build plugin ZIP run: | - PLUGIN_NAME="Plugin_Test_Action" - VERSION="${{ steps.channel.outputs.version }}" - mkdir -p dist - zip -r dist/${PLUGIN_NAME}-${VERSION}.zip \ - ${PLUGIN_NAME}/ \ + REPO_NAME="${{ github.event.repository.name }}" + ZIP_FOLDER="${{ steps.cfg.outputs.zip_folder }}" + VERSION="${{ steps.info.outputs.version }}" + ZIP_NAME="${REPO_NAME}-${VERSION}.zip" + + # Temporären Ordner mit zip_folder-Namen anlegen + mkdir -p dist/${ZIP_FOLDER} + + # Alle Plugin-Dateien hineinkopieren (ohne .gitea, .plugin, dist) + rsync -a \ + --exclude='.gitea' \ + --exclude='.plugin' \ + --exclude='.git' \ + --exclude='dist' \ + ./ dist/${ZIP_FOLDER}/ + + # ZIP bauen + cd dist + zip -r ${ZIP_NAME} ${ZIP_FOLDER}/ \ -x "*.pyc" -x "*/__pycache__/*" - echo "ZIP_PATH=dist/${PLUGIN_NAME}-${VERSION}.zip" >> $GITHUB_ENV - echo "PLUGIN_NAME=${PLUGIN_NAME}" >> $GITHUB_ENV - echo "VERSION=${VERSION}" >> $GITHUB_ENV + cd .. + + echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV - name: Create Gitea Release id: create_release run: | + VERSION="${{ steps.info.outputs.version }}" IS_PRERELEASE=true - [[ "${{ steps.channel.outputs.channel }}" == "stable" ]] && IS_PRERELEASE=false + [[ "${{ steps.info.outputs.channel }}" == "stable" ]] && IS_PRERELEASE=false RESPONSE=$(curl -s -X POST \ -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ -H "Content-Type: application/json" \ "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases" \ -d "{ - \"tag_name\": \"${VERSION}\", + \"tag_name\": \"${{ github.ref_name }}\", \"name\": \"Release ${VERSION}\", \"prerelease\": ${IS_PRERELEASE} }") - echo "RELEASE_ID=$(echo $RESPONSE | grep -o '\"id\":[0-9]*' | head -1 | cut -d: -f2)" >> $GITHUB_ENV + + RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) + echo "release_id=${RELEASE_ID}" >> $GITHUB_OUTPUT - name: Upload ZIP asset + id: upload_asset run: | - curl -s -X POST \ + RESPONSE=$(curl -s -X POST \ -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ -H "Content-Type: application/zip" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets?name=$(basename ${ZIP_PATH})" \ - --data-binary @${ZIP_PATH} + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ steps.create_release.outputs.release_id }}/assets?name=${ZIP_NAME}" \ + --data-binary @dist/${ZIP_NAME}) - - name: Get asset download URL + DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) + echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT + + - name: Build XML block + id: xmlblock run: | - ASSETS=$(curl -s \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets") - DOWNLOAD_URL=$(echo $ASSETS | grep -o '"browser_download_url":"[^"]*' | head -1 | cut -d'"' -f4) - echo "DOWNLOAD_URL=${DOWNLOAD_URL}" >> $GITHUB_ENV + BLOCK=" \n" + BLOCK+=" ${{ steps.cfg.outputs.description }}\n" + BLOCK+=" ${{ steps.cfg.outputs.qgis_min }}\n" + BLOCK+=" ${{ steps.cfg.outputs.qgis_max }}\n" + BLOCK+=" ${{ steps.cfg.outputs.author }}\n" + BLOCK+=" ${{ steps.cfg.outputs.email }}\n" + BLOCK+=" ${{ steps.cfg.outputs.homepage }}\n" + BLOCK+=" ${{ steps.cfg.outputs.tracker }}\n" + BLOCK+=" ${{ steps.cfg.outputs.repository }}\n" + BLOCK+=" ${{ steps.upload_asset.outputs.download_url }}\n" + BLOCK+=" ${{ steps.cfg.outputs.experimental }}\n" + BLOCK+=" ${{ steps.cfg.outputs.deprecated }}\n" + BLOCK+=" " - - name: Trigger Repository update + BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') + echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT + + - name: Dispatch to Repository run: | curl -s -X POST \ -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ @@ -90,9 +163,8 @@ jobs: -d "{ \"type\": \"plugin-released\", \"payload\": { - \"plugin\": \"${PLUGIN_NAME}\", - \"version\": \"${VERSION}\", - \"channel\": \"${{ steps.channel.outputs.channel }}\", - \"download_url\": \"${DOWNLOAD_URL}\" + \"plugin\": \"${{ steps.cfg.outputs.name }}\", + \"channel\": \"${{ steps.info.outputs.channel }}\", + \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" } }" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 36b13f1..1e87eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,4 @@ cython_debug/ # PyPI configuration file .pypirc +metadata.txt \ No newline at end of file diff --git a/.plugin/changelog.txt b/.plugin/changelog.txt new file mode 100644 index 0000000..efe02ee --- /dev/null +++ b/.plugin/changelog.txt @@ -0,0 +1,5 @@ +0.2.0 + - Feature XY hinzugefügt + - Bug Z behoben +0.1.0 + - Initiales Release \ No newline at end of file diff --git a/.plugin/plugin.cfg b/.plugin/plugin.cfg new file mode 100644 index 0000000..6bd305f --- /dev/null +++ b/.plugin/plugin.cfg @@ -0,0 +1,14 @@ +[general] +zip_folder=mein_plugin_ordner +name=LNO Sachsen | Plugin Test Action +qgisMinimumVersion=3.0 +qgisMaximumVersion=3.99 +description=Test plugin for release pipeline +version=26.3.1 +author=Michael Otto +email=michael.otto@landkreis-mittelsachsen.de +homepage=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action +tracker=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/issues +repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action +experimental=False +deprecated=False \ No newline at end of file From 4e1719472b528101a68ff3923a7658257de549a4 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 10:16:43 +0100 Subject: [PATCH 03/84] .gitea/workflows/release.yml aktualisiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit checkout geändert --- .gitea/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 383c1a9..5e36ff1 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -9,7 +9,14 @@ jobs: release: runs-on: alpine-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + run: | + curl -s -L \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/archive/${{ github.sha }}.tar.gz" \ + -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm repo.tar.gz - name: Install dependencies run: apk add --no-cache zip curl From d5e403d3dea83fe2e887d0cd9bd4b5270ab2f1f2 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 10:18:20 +0100 Subject: [PATCH 04/84] .gitea/workflows/release.yml aktualisiert Syntax korrigiert --- .gitea/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5e36ff1..2cdd61b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -10,13 +10,13 @@ jobs: runs-on: alpine-latest steps: - name: Checkout - run: | - curl -s -L \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/archive/${{ github.sha }}.tar.gz" \ - -o repo.tar.gz - tar -xzf repo.tar.gz --strip-components=1 - rm repo.tar.gz + run: | + curl -s -L \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/archive/${{ github.sha }}.tar.gz" \ + -o repo.tar.gz + tar -xzf repo.tar.gz --strip-components=1 + rm repo.tar.gz - name: Install dependencies run: apk add --no-cache zip curl From 947727343017a2d80ea473274a748df86e50c421 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 10:25:01 +0100 Subject: [PATCH 05/84] Install dependencies an den Anfang gestellt --- .gitea/workflows/release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2cdd61b..cd33149 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -9,6 +9,8 @@ jobs: release: runs-on: alpine-latest steps: + - name: Install dependencies + run: apk add --no-cache zip curl - name: Checkout run: | curl -s -L \ @@ -17,10 +19,6 @@ jobs: -o repo.tar.gz tar -xzf repo.tar.gz --strip-components=1 rm repo.tar.gz - - - name: Install dependencies - run: apk add --no-cache zip curl - - name: Determine version and channel id: info run: | From 2e1651eaf4f6b5d3920b1ede2dd2cfa45f636cf3 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 10:30:50 +0100 Subject: [PATCH 06/84] =?UTF-8?q?dependencies=20und=20checkout=20von=20Eri?= =?UTF-8?q?k=20=C3=BCbernommen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cd33149..f35a692 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -8,17 +8,20 @@ on: jobs: release: runs-on: alpine-latest + defaults: + run: + shell: sh + steps: - name: Install dependencies - run: apk add --no-cache zip curl + run: | + apk add --no-cache git zip curl jq + git config --global http.sslVerify false + - name: Checkout run: | - curl -s -L \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/archive/${{ github.sha }}.tar.gz" \ - -o repo.tar.gz - tar -xzf repo.tar.gz --strip-components=1 - rm repo.tar.gz + git clone --depth 1 --branch ${{ github.ref_name }} https://x-access-token:${{ gitea.token }}@entwicklung.flurneuordnung-sachsen.de/${{ github.repository }}.git . + - name: Determine version and channel id: info run: | From 5e59e2bb862bed0df8cff9588730111943a1c571 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 10:33:20 +0100 Subject: [PATCH 07/84] =?UTF-8?q?dependency=20rsync=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f35a692..a91a766 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Install dependencies run: | - apk add --no-cache git zip curl jq + apk add --no-cache git zip curl jq rsync git config --global http.sslVerify false - name: Checkout From c3077eeb7cfeff16cc3213f9c8add1da2414a2d3 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 10:58:52 +0100 Subject: [PATCH 08/84] =?UTF-8?q?RELEASE=5FURL=20und=20RELEASE=5FTOKEN=20e?= =?UTF-8?q?ingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a91a766..2d6d767 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Checkout run: | - git clone --depth 1 --branch ${{ github.ref_name }} https://x-access-token:${{ gitea.token }}@entwicklung.flurneuordnung-sachsen.de/${{ github.repository }}.git . + git clone --depth 1 --branch ${{ github.ref_name }} https://x-access-token:${{ gitea.token }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git . - name: Determine version and channel id: info @@ -118,9 +118,9 @@ jobs: [[ "${{ steps.info.outputs.channel }}" == "stable" ]] && IS_PRERELEASE=false RESPONSE=$(curl -s -X POST \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases" \ -d "{ \"tag_name\": \"${{ github.ref_name }}\", \"name\": \"Release ${VERSION}\", @@ -134,9 +134,9 @@ jobs: id: upload_asset run: | RESPONSE=$(curl -s -X POST \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/zip" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ steps.create_release.outputs.release_id }}/assets?name=${ZIP_NAME}" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ steps.create_release.outputs.release_id }}/assets?name=${ZIP_NAME}" \ --data-binary @dist/${ZIP_NAME}) DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) @@ -165,9 +165,9 @@ jobs: - name: Dispatch to Repository run: | curl -s -X POST \ - -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - "${{ vars.GITEA_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ -d "{ \"type\": \"plugin-released\", \"payload\": { From 9a0f34d08c361718ebc2a5dde2cf02ae0e33883c Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 11:02:26 +0100 Subject: [PATCH 09/84] Build XML block angepasst --- .gitea/workflows/release.yml | 38 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2d6d767..bf381c6 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -143,24 +143,28 @@ jobs: echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - name: Build XML block - id: xmlblock - run: | - BLOCK=" \n" - BLOCK+=" ${{ steps.cfg.outputs.description }}\n" - BLOCK+=" ${{ steps.cfg.outputs.qgis_min }}\n" - BLOCK+=" ${{ steps.cfg.outputs.qgis_max }}\n" - BLOCK+=" ${{ steps.cfg.outputs.author }}\n" - BLOCK+=" ${{ steps.cfg.outputs.email }}\n" - BLOCK+=" ${{ steps.cfg.outputs.homepage }}\n" - BLOCK+=" ${{ steps.cfg.outputs.tracker }}\n" - BLOCK+=" ${{ steps.cfg.outputs.repository }}\n" - BLOCK+=" ${{ steps.upload_asset.outputs.download_url }}\n" - BLOCK+=" ${{ steps.cfg.outputs.experimental }}\n" - BLOCK+=" ${{ steps.cfg.outputs.deprecated }}\n" - BLOCK+=" " + id: xmlblock + run: | + NAME="${{ steps.cfg.outputs.name }}" + VERSION="${{ steps.info.outputs.version }}" + + BLOCK=$(printf ' \n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n ' \ + "$NAME" \ + "$VERSION" \ + "${{ steps.cfg.outputs.description }}" \ + "${{ steps.cfg.outputs.qgis_min }}" \ + "${{ steps.cfg.outputs.qgis_max }}" \ + "${{ steps.cfg.outputs.author }}" \ + "${{ steps.cfg.outputs.email }}" \ + "${{ steps.cfg.outputs.homepage }}" \ + "${{ steps.cfg.outputs.tracker }}" \ + "${{ steps.cfg.outputs.repository }}" \ + "${{ steps.download_url.outputs.download_url }}" \ + "${{ steps.cfg.outputs.experimental }}" \ + "${{ steps.cfg.outputs.deprecated }}") - BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') - echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT + BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') + echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT - name: Dispatch to Repository run: | From 5d194fe628ee2265e17c1d0c0108495e3eac4940 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Mon, 2 Mar 2026 11:12:08 +0100 Subject: [PATCH 10/84] Syntax release.yml korrigiert ... --- .gitea/workflows/release.yml | 41 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bf381c6..e75c6d5 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: Release Plugin on: @@ -143,28 +144,28 @@ jobs: echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - name: Build XML block - id: xmlblock - run: | - NAME="${{ steps.cfg.outputs.name }}" - VERSION="${{ steps.info.outputs.version }}" + id: xmlblock + run: | + NAME="${{ steps.cfg.outputs.name }}" + VERSION="${{ steps.info.outputs.version }}" - BLOCK=$(printf ' \n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n ' \ - "$NAME" \ - "$VERSION" \ - "${{ steps.cfg.outputs.description }}" \ - "${{ steps.cfg.outputs.qgis_min }}" \ - "${{ steps.cfg.outputs.qgis_max }}" \ - "${{ steps.cfg.outputs.author }}" \ - "${{ steps.cfg.outputs.email }}" \ - "${{ steps.cfg.outputs.homepage }}" \ - "${{ steps.cfg.outputs.tracker }}" \ - "${{ steps.cfg.outputs.repository }}" \ - "${{ steps.download_url.outputs.download_url }}" \ - "${{ steps.cfg.outputs.experimental }}" \ - "${{ steps.cfg.outputs.deprecated }}") + BLOCK=$(printf ' \n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n ' \ + "$NAME" \ + "$VERSION" \ + "${{ steps.cfg.outputs.description }}" \ + "${{ steps.cfg.outputs.qgis_min }}" \ + "${{ steps.cfg.outputs.qgis_max }}" \ + "${{ steps.cfg.outputs.author }}" \ + "${{ steps.cfg.outputs.email }}" \ + "${{ steps.cfg.outputs.homepage }}" \ + "${{ steps.cfg.outputs.tracker }}" \ + "${{ steps.cfg.outputs.repository }}" \ + "${{ steps.download_url.outputs.download_url }}" \ + "${{ steps.cfg.outputs.experimental }}" \ + "${{ steps.cfg.outputs.deprecated }}") - BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') - echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT + BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') + echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT - name: Dispatch to Repository run: | From be5d1ed18c1b89d9dda833762e8a6d5d02b7db30 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 12:25:45 +0100 Subject: [PATCH 11/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e75c6d5..1bf9662 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -21,7 +21,10 @@ jobs: - name: Checkout run: | - git clone --depth 1 --branch ${{ github.ref_name }} https://x-access-token:${{ gitea.token }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git . + git clone --depth 1 \ + --branch ${{ github.ref_name }} \ + http://x-access-token:${{ secrets.GITEA_TOKEN }}@${{ vars.GITEA_URL }}/${{ github.repository }}.git \ + . - name: Determine version and channel id: info @@ -40,6 +43,10 @@ jobs: echo "version=${VERSION}" >> $GITHUB_OUTPUT echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + # Nur fürs Log: + echo "VERSION: $VERSION" + echo "CHANNEL: $CHANNEL" + - name: Read plugin.cfg id: cfg run: | @@ -62,6 +69,20 @@ jobs: echo "experimental=$(get_value experimental)" >> $GITHUB_OUTPUT echo "deprecated=$(get_value deprecated)" >> $GITHUB_OUTPUT + # Nur fürs Log: + echo "zip_folder=$(get_value zip_folder)" + echo "name=$(get_value name)" + echo "qgis_min=$(get_value qgisMinimumVersion)" + echo "qgis_max=$(get_value qgisMaximumVersion)" + echo "description=$(get_value description)" + echo "author=$(get_value author)" + echo "email=$(get_value email)" + echo "homepage=$(get_value homepage)" + echo "tracker=$(get_value tracker)" + echo "repository=$(get_value repository)" + echo "experimental=$(get_value experimental)" + echo "deprecated=$(get_value deprecated)" + - name: Generate metadata.txt run: | VERSION="${{ steps.info.outputs.version }}" @@ -85,6 +106,9 @@ jobs: $(cat .plugin/changelog.txt) EOF + # Nur fürs Log: + cat metadata.txt + - name: Build plugin ZIP run: | REPO_NAME="${{ github.event.repository.name }}" @@ -111,6 +135,9 @@ jobs: echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV + # Nur fürs Log: + echo "ZIP_NAME=${ZIP_NAME}" + - name: Create Gitea Release id: create_release run: | From 8db121d08fd7ec92c9219c4ba748c73cef4f3880 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 12:27:05 +0100 Subject: [PATCH 12/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1bf9662..8c824c0 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -23,7 +23,7 @@ jobs: run: | git clone --depth 1 \ --branch ${{ github.ref_name }} \ - http://x-access-token:${{ secrets.GITEA_TOKEN }}@${{ vars.GITEA_URL }}/${{ github.repository }}.git \ + http://x-access-token:${{ secrets.RELEASE_TOKEN }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git \ . - name: Determine version and channel From c4f32e3f4b91ec857167bc58a00031d9b3a2833e Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 12:28:08 +0100 Subject: [PATCH 13/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8c824c0..c1125dd 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -23,7 +23,7 @@ jobs: run: | git clone --depth 1 \ --branch ${{ github.ref_name }} \ - http://x-access-token:${{ secrets.RELEASE_TOKEN }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git \ + https://x-access-token:${{ secrets.RELEASE_TOKEN }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git \ . - name: Determine version and channel From 0920f096d9d73fe96f5fcd4eacef81003f408ea8 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 12:34:57 +0100 Subject: [PATCH 14/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c1125dd..6ab4be4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -138,6 +138,15 @@ jobs: # Nur fürs Log: echo "ZIP_NAME=${ZIP_NAME}" + - name: Check if release exists + id: check_release + run: | + RESPONSE=$(curl -s \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }}") + + echo "response=$RESPONSE" >> $GITHUB_OUTPUT + - name: Create Gitea Release id: create_release run: | From cf55936a5a7c88f57e668e5ad2df61f8b3f10bac Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 12:51:08 +0100 Subject: [PATCH 15/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6ab4be4..f06aadc 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -32,13 +32,11 @@ jobs: TAG="${{ github.ref_name }}" VERSION="${TAG#v}" - if [[ "$TAG" =~ -dev ]]; then - CHANNEL="dev" - elif [[ "$TAG" =~ -beta ]]; then - CHANNEL="beta" - else - CHANNEL="stable" - fi + case "$TAG" in + *-dev*) CHANNEL="dev" ;; + *-beta*) CHANNEL="beta" ;; + *) CHANNEL="stable" ;; + esac echo "version=${VERSION}" >> $GITHUB_OUTPUT echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT @@ -179,6 +177,8 @@ jobs: DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT + echo "Upload response: $RESPONSE" + - name: Build XML block id: xmlblock run: | From 204af9c3816ca2744febbbd09fd855d57959437d Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:00:56 +0100 Subject: [PATCH 16/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f06aadc..cfff714 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -144,6 +144,7 @@ jobs: "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }}") echo "response=$RESPONSE" >> $GITHUB_OUTPUT + echo "Check response: $RESPONSE" - name: Create Gitea Release id: create_release From f58b26cd9399474ee8f5f2703521055391e2e4ac Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:04:52 +0100 Subject: [PATCH 17/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 45 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cfff714..2c5173f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -136,35 +136,32 @@ jobs: # Nur fürs Log: echo "ZIP_NAME=${ZIP_NAME}" - - name: Check if release exists - id: check_release - run: | - RESPONSE=$(curl -s \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }}") - - echo "response=$RESPONSE" >> $GITHUB_OUTPUT - echo "Check response: $RESPONSE" - - name: Create Gitea Release id: create_release run: | - VERSION="${{ steps.info.outputs.version }}" - IS_PRERELEASE=true - [[ "${{ steps.info.outputs.channel }}" == "stable" ]] && IS_PRERELEASE=false - - RESPONSE=$(curl -s -X POST \ + echo "Kommuniziere mit Gitea API über HTTPS..." + API_RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases" \ + -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases" \ - -d "{ - \"tag_name\": \"${{ github.ref_name }}\", - \"name\": \"Release ${VERSION}\", - \"prerelease\": ${IS_PRERELEASE} - }") - - RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) - echo "release_id=${RELEASE_ID}" >> $GITHUB_OUTPUT + -d '{ + "body": "Dieses Release wurde automatisch vom Gitea Runner erstellt.", + "draft": false, + "name": "Version ${{ github.ref_name }}", + "prerelease": false, + "tag_name": "${{ github.ref_name }}" + }') + + RELEASE_ID=$(echo $API_RESPONSE | jq -r '.id') + + if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then + echo "Fehler beim Erstellen des Releases. API Antwort:" + echo $API_RESPONSE + exit 1 + fi + + echo "Release ID: $RELEASE_ID" + echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV - name: Upload ZIP asset id: upload_asset From ada7108fefa0fa28ed27daa7276f05e446f8eded Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:12:39 +0100 Subject: [PATCH 18/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2c5173f..cbc9d8c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -166,11 +166,13 @@ jobs: - name: Upload ZIP asset id: upload_asset run: | - RESPONSE=$(curl -s -X POST \ + + RESPONSE=$(curl -s -k -X POST + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=release_${ZIP_NAME}" \ + -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/zip" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ steps.create_release.outputs.release_id }}/assets?name=${ZIP_NAME}" \ - --data-binary @dist/${ZIP_NAME}) + -H "Content-Type: multipart/form-data" \ + -F "attachment=@release_${ZIP_NAME}" DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT From df7a2ba495f613274396b04536bdcbf2c6d00b55 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:14:30 +0100 Subject: [PATCH 19/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cbc9d8c..44cdf5d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -166,13 +166,12 @@ jobs: - name: Upload ZIP asset id: upload_asset run: | - RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=release_${ZIP_NAME}" \ -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ - -F "attachment=@release_${ZIP_NAME}" + -F "attachment=@release_${ZIP_NAME}") DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT From 262ef56a8ff4905c219a2caeda1812aaded226b3 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:16:21 +0100 Subject: [PATCH 20/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 44cdf5d..5b04e6d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -167,11 +167,11 @@ jobs: id: upload_asset run: | RESPONSE=$(curl -s -k -X POST - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=release_${ZIP_NAME}" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${ZIP_NAME}" \ -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ - -F "attachment=@release_${ZIP_NAME}") + -F "attachment=${ZIP_NAME}") DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT From 204afc6c5f2077b0def92fa57ff2ed9ebee5ba9b Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:20:51 +0100 Subject: [PATCH 21/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5b04e6d..cf8e894 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -167,11 +167,11 @@ jobs: id: upload_asset run: | RESPONSE=$(curl -s -k -X POST - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${ZIP_NAME}" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ - -F "attachment=${ZIP_NAME}") + -F "attachment=${{ env.ZIP_NAME }}") DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT From 11a5cda7855408a88dd4d10445822332d9cefb60 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:23:13 +0100 Subject: [PATCH 22/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cf8e894..a767edb 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -166,6 +166,7 @@ jobs: - name: Upload ZIP asset id: upload_asset run: | + echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }})hoch..." RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ -H "accept: application/json" \ From d4b45ff7d79ac73a93e612af61f813edb7e1d84a Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:26:05 +0100 Subject: [PATCH 23/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a767edb..525a255 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -174,10 +174,12 @@ jobs: -H "Content-Type: multipart/form-data" \ -F "attachment=${{ env.ZIP_NAME }}") + echo "Upload response: $RESPONSE" + DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - echo "Upload response: $RESPONSE" + - name: Build XML block id: xmlblock From e3255b9c0977ad15220362a397254a3ea81f1330 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:27:34 +0100 Subject: [PATCH 24/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 525a255..bfee892 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -167,8 +167,7 @@ jobs: id: upload_asset run: | echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }})hoch..." - RESPONSE=$(curl -s -k -X POST - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ + RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ From b8364abb9ca4b1f437ce59adaf4cd9b879ff10b8 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:31:18 +0100 Subject: [PATCH 25/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bfee892..6eac123 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -166,20 +166,20 @@ jobs: - name: Upload ZIP asset id: upload_asset run: | - echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }})hoch..." - RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ + echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }}) hoch..." + + RESPONSE=$(curl -s -k -X POST \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: multipart/form-data" \ - -F "attachment=${{ env.ZIP_NAME }}") + -F "attachment=@dist/${{ env.ZIP_NAME }}") echo "Upload response: $RESPONSE" DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - - - name: Build XML block id: xmlblock run: | From 09d3ba2157b3869f480efb866c6fa2f4eb81146b Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:38:02 +0100 Subject: [PATCH 26/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6eac123..23ecc46 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -186,20 +186,22 @@ jobs: NAME="${{ steps.cfg.outputs.name }}" VERSION="${{ steps.info.outputs.version }}" - BLOCK=$(printf ' \n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n %s\n ' \ - "$NAME" \ - "$VERSION" \ - "${{ steps.cfg.outputs.description }}" \ - "${{ steps.cfg.outputs.qgis_min }}" \ - "${{ steps.cfg.outputs.qgis_max }}" \ - "${{ steps.cfg.outputs.author }}" \ - "${{ steps.cfg.outputs.email }}" \ - "${{ steps.cfg.outputs.homepage }}" \ - "${{ steps.cfg.outputs.tracker }}" \ - "${{ steps.cfg.outputs.repository }}" \ - "${{ steps.download_url.outputs.download_url }}" \ - "${{ steps.cfg.outputs.experimental }}" \ - "${{ steps.cfg.outputs.deprecated }}") + BLOCK=$(cat < + ${{ steps.cfg.outputs.description }} + ${{ steps.cfg.outputs.qgis_min }} + ${{ steps.cfg.outputs.qgis_max }} + ${{ steps.cfg.outputs.author }} + ${{ steps.cfg.outputs.email }} + ${{ steps.cfg.outputs.homepage }} + ${{ steps.cfg.outputs.tracker }} + ${{ steps.cfg.outputs.repository }} + ${{ steps.upload_asset.outputs.download_url }} + ${{ steps.cfg.outputs.experimental }} + ${{ steps.cfg.outputs.deprecated }} + + EOF + ) BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT From b744803e116f8af3e6fbc0c74fefcdd805a2012f Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:46:29 +0100 Subject: [PATCH 27/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 43 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 23ecc46..4c6fd66 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -185,26 +185,31 @@ jobs: run: | NAME="${{ steps.cfg.outputs.name }}" VERSION="${{ steps.info.outputs.version }}" - - BLOCK=$(cat < - ${{ steps.cfg.outputs.description }} - ${{ steps.cfg.outputs.qgis_min }} - ${{ steps.cfg.outputs.qgis_max }} - ${{ steps.cfg.outputs.author }} - ${{ steps.cfg.outputs.email }} - ${{ steps.cfg.outputs.homepage }} - ${{ steps.cfg.outputs.tracker }} - ${{ steps.cfg.outputs.repository }} - ${{ steps.upload_asset.outputs.download_url }} - ${{ steps.cfg.outputs.experimental }} - ${{ steps.cfg.outputs.deprecated }} - - EOF - ) - BLOCK_ESCAPED=$(printf '%s' "$BLOCK" | sed 's/"/\\"/g') - echo "block=${BLOCK_ESCAPED}" >> $GITHUB_OUTPUT + BLOCK=$(cat < + ${{ steps.cfg.outputs.description }} + ${{ steps.cfg.outputs.qgis_min }} + ${{ steps.cfg.outputs.qgis_max }} + ${{ steps.cfg.outputs.author }} + ${{ steps.cfg.outputs.email }} + ${{ steps.cfg.outputs.homepage }} + ${{ steps.cfg.outputs.tracker }} + ${{ steps.cfg.outputs.repository }} + ${{ steps.upload_asset.outputs.download_url }} + ${{ steps.cfg.outputs.experimental }} + ${{ steps.cfg.outputs.deprecated }} + + EOF + ) + + # Mehrzeiligen Output korrekt setzen + { + echo "block<> "$GITHUB_OUTPUT" + - name: Dispatch to Repository run: | From 79f78bba258c8e072960ce6b03ee1d7b61c1a91c Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:47:35 +0100 Subject: [PATCH 28/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 46 +----------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4c6fd66..061983f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -180,48 +180,4 @@ jobs: DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - - name: Build XML block - id: xmlblock - run: | - NAME="${{ steps.cfg.outputs.name }}" - VERSION="${{ steps.info.outputs.version }}" - - BLOCK=$(cat < - ${{ steps.cfg.outputs.description }} - ${{ steps.cfg.outputs.qgis_min }} - ${{ steps.cfg.outputs.qgis_max }} - ${{ steps.cfg.outputs.author }} - ${{ steps.cfg.outputs.email }} - ${{ steps.cfg.outputs.homepage }} - ${{ steps.cfg.outputs.tracker }} - ${{ steps.cfg.outputs.repository }} - ${{ steps.upload_asset.outputs.download_url }} - ${{ steps.cfg.outputs.experimental }} - ${{ steps.cfg.outputs.deprecated }} - - EOF - ) - - # Mehrzeiligen Output korrekt setzen - { - echo "block<> "$GITHUB_OUTPUT" - - - - name: Dispatch to Repository - run: | - curl -s -X POST \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/json" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ - -d "{ - \"type\": \"plugin-released\", - \"payload\": { - \"plugin\": \"${{ steps.cfg.outputs.name }}\", - \"channel\": \"${{ steps.info.outputs.channel }}\", - \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" - } - }" \ No newline at end of file + \ No newline at end of file From 0dd0d61045d98502739e0575b28774374384c911 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:48:50 +0100 Subject: [PATCH 29/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 061983f..c0f7ef7 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -180,4 +180,32 @@ jobs: DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - \ No newline at end of file + - name: Build XML block + id: xmlblock + run: | + NAME="${{ steps.cfg.outputs.name }}" + VERSION="${{ steps.info.outputs.version }}" + + BLOCK=$(cat < + ${{ steps.cfg.outputs.description }} + ${{ steps.cfg.outputs.qgis_min }} + ${{ steps.cfg.outputs.qgis_max }} + ${{ steps.cfg.outputs.author }} + ${{ steps.cfg.outputs.email }} + ${{ steps.cfg.outputs.homepage }} + ${{ steps.cfg.outputs.tracker }} + ${{ steps.cfg.outputs.repository }} + ${{ steps.upload_asset.outputs.download_url }} + ${{ steps.cfg.outputs.experimental }} + ${{ steps.cfg.outputs.deprecated }} + + EOF + ) + + # Mehrzeiligen Output korrekt setzen + { + echo "block<> "$GITHUB_OUTPUT" From 5044c7ac5603e9e27b7ec3477d032c0c0a894b41 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:53:51 +0100 Subject: [PATCH 30/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c0f7ef7..53ffe1f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -187,25 +187,24 @@ jobs: VERSION="${{ steps.info.outputs.version }}" BLOCK=$(cat < - ${{ steps.cfg.outputs.description }} - ${{ steps.cfg.outputs.qgis_min }} - ${{ steps.cfg.outputs.qgis_max }} - ${{ steps.cfg.outputs.author }} - ${{ steps.cfg.outputs.email }} - ${{ steps.cfg.outputs.homepage }} - ${{ steps.cfg.outputs.tracker }} - ${{ steps.cfg.outputs.repository }} - ${{ steps.upload_asset.outputs.download_url }} - ${{ steps.cfg.outputs.experimental }} - ${{ steps.cfg.outputs.deprecated }} - - EOF - ) + + ${{ steps.cfg.outputs.description }} + ${{ steps.cfg.outputs.qgis_min }} + ${{ steps.cfg.outputs.qgis_max }} + ${{ steps.cfg.outputs.author }} + ${{ steps.cfg.outputs.email }} + ${{ steps.cfg.outputs.homepage }} + ${{ steps.cfg.outputs.tracker }} + ${{ steps.cfg.outputs.repository }} + ${{ steps.upload_asset.outputs.download_url }} + ${{ steps.cfg.outputs.experimental }} + ${{ steps.cfg.outputs.deprecated }} + + EOF + ) - # Mehrzeiligen Output korrekt setzen { echo "block<> "$GITHUB_OUTPUT" + } >> "$GITHUB_OUTPUT" \ No newline at end of file From 0b8b30a748ba29c7896c12a7bc0b0e6e4ceeaad2 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 13:56:11 +0100 Subject: [PATCH 31/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 53ffe1f..5392e8b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -207,4 +207,19 @@ jobs: echo "block<> "$GITHUB_OUTPUT" \ No newline at end of file + } >> "$GITHUB_OUTPUT" + + - name: Dispatch to Repository + run: | + curl -s -X POST \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/json" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ + -d "{ + \"type\": \"plugin-released\", + \"payload\": { + \"plugin\": \"${{ steps.cfg.outputs.name }}\", + \"channel\": \"${{ steps.info.outputs.channel }}\", + \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" + } + }" From 80b39f8326aed9ba80b0851b207a518e5442054c Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 14:01:59 +0100 Subject: [PATCH 32/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5392e8b..a0c2fbf 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -211,15 +211,27 @@ jobs: - name: Dispatch to Repository run: | + XML_BLOCK="${{ steps.xmlblock.outputs.block }}" + + JSON=$(jq -n \ + --arg type "plugin-released" \ + --arg plugin "${{ steps.cfg.outputs.name }}" \ + --arg channel "${{ steps.info.outputs.channel }}" \ + --arg xml "$XML_BLOCK" \ + '{ + type: $type, + payload: { + plugin: $plugin, + channel: $channel, + xml_block: $xml + } + }') + + echo "Dispatch JSON:" + echo "$JSON" + curl -s -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ - -d "{ - \"type\": \"plugin-released\", - \"payload\": { - \"plugin\": \"${{ steps.cfg.outputs.name }}\", - \"channel\": \"${{ steps.info.outputs.channel }}\", - \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" - } - }" + -d "$JSON" From b5ba3c46dcf2ccb6878c85e575455343ce473227 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 14:04:18 +0100 Subject: [PATCH 33/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a0c2fbf..3d882c1 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -218,17 +218,7 @@ jobs: --arg plugin "${{ steps.cfg.outputs.name }}" \ --arg channel "${{ steps.info.outputs.channel }}" \ --arg xml "$XML_BLOCK" \ - '{ - type: $type, - payload: { - plugin: $plugin, - channel: $channel, - xml_block: $xml - } - }') - - echo "Dispatch JSON:" - echo "$JSON" + '{type:$type,payload:{plugin:$plugin,channel:$channel,xml_block:$xml}}') curl -s -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ From 47197cd819d1eb3c91509a0ac7308521decba3e4 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 14:06:54 +0100 Subject: [PATCH 34/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3d882c1..5392e8b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -211,17 +211,15 @@ jobs: - name: Dispatch to Repository run: | - XML_BLOCK="${{ steps.xmlblock.outputs.block }}" - - JSON=$(jq -n \ - --arg type "plugin-released" \ - --arg plugin "${{ steps.cfg.outputs.name }}" \ - --arg channel "${{ steps.info.outputs.channel }}" \ - --arg xml "$XML_BLOCK" \ - '{type:$type,payload:{plugin:$plugin,channel:$channel,xml_block:$xml}}') - curl -s -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ - -d "$JSON" + -d "{ + \"type\": \"plugin-released\", + \"payload\": { + \"plugin\": \"${{ steps.cfg.outputs.name }}\", + \"channel\": \"${{ steps.info.outputs.channel }}\", + \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" + } + }" From c4b147d02c33f58c85b06d66e5d657296e81c15d Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 14:16:36 +0100 Subject: [PATCH 35/84] auf bash ungestellt --- .gitea/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5392e8b..1600c0d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -11,12 +11,12 @@ jobs: runs-on: alpine-latest defaults: run: - shell: sh + shell: bash steps: - name: Install dependencies run: | - apk add --no-cache git zip curl jq rsync + apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false - name: Checkout From 30e82929e926725973ae7caa8fb6cd1a1228e468 Mon Sep 17 00:00:00 2001 From: Michael Otto <22ottomi@noreply.localhost> Date: Mon, 2 Mar 2026 14:18:34 +0100 Subject: [PATCH 36/84] .gitea/workflows/release.yml aktualisiert --- .gitea/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 1600c0d..a570c93 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: alpine-latest defaults: run: - shell: bash + shell: sh steps: - name: Install dependencies @@ -210,6 +210,7 @@ jobs: } >> "$GITHUB_OUTPUT" - name: Dispatch to Repository + shell: bash run: | curl -s -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ From a46b25bcc74cfa035a59bed5629fb229aa29ea9d Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:22:32 +0100 Subject: [PATCH 37/84] Add release workflow --- .gitea/workflows/release.yml | 359 ++++++++++++++++++----------------- 1 file changed, 182 insertions(+), 177 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a570c93..0c71de4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -11,216 +11,221 @@ jobs: runs-on: alpine-latest defaults: run: - shell: sh + shell: bash steps: - - name: Install dependencies + - name: Notwendige Abhängigkeiten installieren run: | apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false - - name: Checkout + - name: Debug Info run: | - git clone --depth 1 \ - --branch ${{ github.ref_name }} \ - https://x-access-token:${{ secrets.RELEASE_TOKEN }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git \ - . + echo "Tag: $GITEA_REF_NAME" + uname -a - - name: Determine version and channel - id: info - run: | - TAG="${{ github.ref_name }}" - VERSION="${TAG#v}" + # - name: Checkout + # run: | + # git clone --depth 1 \ + # --branch ${{ github.ref_name }} \ + # https://x-access-token:${{ secrets.RELEASE_TOKEN }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git \ + # . - case "$TAG" in - *-dev*) CHANNEL="dev" ;; - *-beta*) CHANNEL="beta" ;; - *) CHANNEL="stable" ;; - esac + # - name: Determine version and channel + # id: info + # run: | + # TAG="${{ github.ref_name }}" + # VERSION="${TAG#v}" - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + # case "$TAG" in + # *-dev*) CHANNEL="dev" ;; + # *-beta*) CHANNEL="beta" ;; + # *) CHANNEL="stable" ;; + # esac - # Nur fürs Log: - echo "VERSION: $VERSION" - echo "CHANNEL: $CHANNEL" + # echo "version=${VERSION}" >> $GITHUB_OUTPUT + # echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT - - name: Read plugin.cfg - id: cfg - run: | - CFG=".plugin/plugin.cfg" + # # Nur fürs Log: + # echo "VERSION: $VERSION" + # echo "CHANNEL: $CHANNEL" - get_value() { - grep -i "^$1" "$CFG" | head -1 | cut -d= -f2- | tr -d '\r' | xargs - } + # - name: Read plugin.cfg + # id: cfg + # run: | + # CFG=".plugin/plugin.cfg" - echo "zip_folder=$(get_value zip_folder)" >> $GITHUB_OUTPUT - echo "name=$(get_value name)" >> $GITHUB_OUTPUT - echo "qgis_min=$(get_value qgisMinimumVersion)" >> $GITHUB_OUTPUT - echo "qgis_max=$(get_value qgisMaximumVersion)" >> $GITHUB_OUTPUT - echo "description=$(get_value description)" >> $GITHUB_OUTPUT - echo "author=$(get_value author)" >> $GITHUB_OUTPUT - echo "email=$(get_value email)" >> $GITHUB_OUTPUT - echo "homepage=$(get_value homepage)" >> $GITHUB_OUTPUT - echo "tracker=$(get_value tracker)" >> $GITHUB_OUTPUT - echo "repository=$(get_value repository)" >> $GITHUB_OUTPUT - echo "experimental=$(get_value experimental)" >> $GITHUB_OUTPUT - echo "deprecated=$(get_value deprecated)" >> $GITHUB_OUTPUT + # get_value() { + # grep -i "^$1" "$CFG" | head -1 | cut -d= -f2- | tr -d '\r' | xargs + # } - # Nur fürs Log: - echo "zip_folder=$(get_value zip_folder)" - echo "name=$(get_value name)" - echo "qgis_min=$(get_value qgisMinimumVersion)" - echo "qgis_max=$(get_value qgisMaximumVersion)" - echo "description=$(get_value description)" - echo "author=$(get_value author)" - echo "email=$(get_value email)" - echo "homepage=$(get_value homepage)" - echo "tracker=$(get_value tracker)" - echo "repository=$(get_value repository)" - echo "experimental=$(get_value experimental)" - echo "deprecated=$(get_value deprecated)" + # echo "zip_folder=$(get_value zip_folder)" >> $GITHUB_OUTPUT + # echo "name=$(get_value name)" >> $GITHUB_OUTPUT + # echo "qgis_min=$(get_value qgisMinimumVersion)" >> $GITHUB_OUTPUT + # echo "qgis_max=$(get_value qgisMaximumVersion)" >> $GITHUB_OUTPUT + # echo "description=$(get_value description)" >> $GITHUB_OUTPUT + # echo "author=$(get_value author)" >> $GITHUB_OUTPUT + # echo "email=$(get_value email)" >> $GITHUB_OUTPUT + # echo "homepage=$(get_value homepage)" >> $GITHUB_OUTPUT + # echo "tracker=$(get_value tracker)" >> $GITHUB_OUTPUT + # echo "repository=$(get_value repository)" >> $GITHUB_OUTPUT + # echo "experimental=$(get_value experimental)" >> $GITHUB_OUTPUT + # echo "deprecated=$(get_value deprecated)" >> $GITHUB_OUTPUT - - name: Generate metadata.txt - run: | - VERSION="${{ steps.info.outputs.version }}" - CHANGELOG=$(cat .plugin/changelog.txt) + # # Nur fürs Log: + # echo "zip_folder=$(get_value zip_folder)" + # echo "name=$(get_value name)" + # echo "qgis_min=$(get_value qgisMinimumVersion)" + # echo "qgis_max=$(get_value qgisMaximumVersion)" + # echo "description=$(get_value description)" + # echo "author=$(get_value author)" + # echo "email=$(get_value email)" + # echo "homepage=$(get_value homepage)" + # echo "tracker=$(get_value tracker)" + # echo "repository=$(get_value repository)" + # echo "experimental=$(get_value experimental)" + # echo "deprecated=$(get_value deprecated)" - cat > metadata.txt << EOF - [general] - name=${{ steps.cfg.outputs.name }} - version=${VERSION} - qgisMinimumVersion=${{ steps.cfg.outputs.qgis_min }} - qgisMaximumVersion=${{ steps.cfg.outputs.qgis_max }} - description=${{ steps.cfg.outputs.description }} - author=${{ steps.cfg.outputs.author }} - email=${{ steps.cfg.outputs.email }} - homepage=${{ steps.cfg.outputs.homepage }} - tracker=${{ steps.cfg.outputs.tracker }} - repository=${{ steps.cfg.outputs.repository }} - experimental=${{ steps.cfg.outputs.experimental }} - deprecated=${{ steps.cfg.outputs.deprecated }} - changelog=${VERSION} - $(cat .plugin/changelog.txt) - EOF + # - name: Generate metadata.txt + # run: | + # VERSION="${{ steps.info.outputs.version }}" + # CHANGELOG=$(cat .plugin/changelog.txt) - # Nur fürs Log: - cat metadata.txt + # cat > metadata.txt << EOF + # [general] + # name=${{ steps.cfg.outputs.name }} + # version=${VERSION} + # qgisMinimumVersion=${{ steps.cfg.outputs.qgis_min }} + # qgisMaximumVersion=${{ steps.cfg.outputs.qgis_max }} + # description=${{ steps.cfg.outputs.description }} + # author=${{ steps.cfg.outputs.author }} + # email=${{ steps.cfg.outputs.email }} + # homepage=${{ steps.cfg.outputs.homepage }} + # tracker=${{ steps.cfg.outputs.tracker }} + # repository=${{ steps.cfg.outputs.repository }} + # experimental=${{ steps.cfg.outputs.experimental }} + # deprecated=${{ steps.cfg.outputs.deprecated }} + # changelog=${VERSION} + # $(cat .plugin/changelog.txt) + # EOF - - name: Build plugin ZIP - run: | - REPO_NAME="${{ github.event.repository.name }}" - ZIP_FOLDER="${{ steps.cfg.outputs.zip_folder }}" - VERSION="${{ steps.info.outputs.version }}" - ZIP_NAME="${REPO_NAME}-${VERSION}.zip" + # # Nur fürs Log: + # cat metadata.txt - # Temporären Ordner mit zip_folder-Namen anlegen - mkdir -p dist/${ZIP_FOLDER} + # - name: Build plugin ZIP + # run: | + # REPO_NAME="${{ github.event.repository.name }}" + # ZIP_FOLDER="${{ steps.cfg.outputs.zip_folder }}" + # VERSION="${{ steps.info.outputs.version }}" + # ZIP_NAME="${REPO_NAME}-${VERSION}.zip" - # Alle Plugin-Dateien hineinkopieren (ohne .gitea, .plugin, dist) - rsync -a \ - --exclude='.gitea' \ - --exclude='.plugin' \ - --exclude='.git' \ - --exclude='dist' \ - ./ dist/${ZIP_FOLDER}/ + # # Temporären Ordner mit zip_folder-Namen anlegen + # mkdir -p dist/${ZIP_FOLDER} - # ZIP bauen - cd dist - zip -r ${ZIP_NAME} ${ZIP_FOLDER}/ \ - -x "*.pyc" -x "*/__pycache__/*" - cd .. + # # Alle Plugin-Dateien hineinkopieren (ohne .gitea, .plugin, dist) + # rsync -a \ + # --exclude='.gitea' \ + # --exclude='.plugin' \ + # --exclude='.git' \ + # --exclude='dist' \ + # ./ dist/${ZIP_FOLDER}/ - echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV + # # ZIP bauen + # cd dist + # zip -r ${ZIP_NAME} ${ZIP_FOLDER}/ \ + # -x "*.pyc" -x "*/__pycache__/*" + # cd .. - # Nur fürs Log: - echo "ZIP_NAME=${ZIP_NAME}" + # echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV - - name: Create Gitea Release - id: create_release - run: | - echo "Kommuniziere mit Gitea API über HTTPS..." - API_RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases" \ - -H "accept: application/json" \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/json" \ - -d '{ - "body": "Dieses Release wurde automatisch vom Gitea Runner erstellt.", - "draft": false, - "name": "Version ${{ github.ref_name }}", - "prerelease": false, - "tag_name": "${{ github.ref_name }}" - }') + # # Nur fürs Log: + # echo "ZIP_NAME=${ZIP_NAME}" + + # - name: Create Gitea Release + # id: create_release + # run: | + # echo "Kommuniziere mit Gitea API über HTTPS..." + # API_RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases" \ + # -H "accept: application/json" \ + # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: application/json" \ + # -d '{ + # "body": "Dieses Release wurde automatisch vom Gitea Runner erstellt.", + # "draft": false, + # "name": "Version ${{ github.ref_name }}", + # "prerelease": false, + # "tag_name": "${{ github.ref_name }}" + # }') - RELEASE_ID=$(echo $API_RESPONSE | jq -r '.id') + # RELEASE_ID=$(echo $API_RESPONSE | jq -r '.id') - if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then - echo "Fehler beim Erstellen des Releases. API Antwort:" - echo $API_RESPONSE - exit 1 - fi + # if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then + # echo "Fehler beim Erstellen des Releases. API Antwort:" + # echo $API_RESPONSE + # exit 1 + # fi - echo "Release ID: $RELEASE_ID" - echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV + # echo "Release ID: $RELEASE_ID" + # echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV - - name: Upload ZIP asset - id: upload_asset - run: | - echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }}) hoch..." + # - name: Upload ZIP asset + # id: upload_asset + # run: | + # echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }}) hoch..." - RESPONSE=$(curl -s -k -X POST \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ - -H "accept: application/json" \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: multipart/form-data" \ - -F "attachment=@dist/${{ env.ZIP_NAME }}") + # RESPONSE=$(curl -s -k -X POST \ + # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ + # -H "accept: application/json" \ + # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: multipart/form-data" \ + # -F "attachment=@dist/${{ env.ZIP_NAME }}") - echo "Upload response: $RESPONSE" + # echo "Upload response: $RESPONSE" - DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) - echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT + # DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) + # echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - - name: Build XML block - id: xmlblock - run: | - NAME="${{ steps.cfg.outputs.name }}" - VERSION="${{ steps.info.outputs.version }}" + # - name: Build XML block + # id: xmlblock + # run: | + # NAME="${{ steps.cfg.outputs.name }}" + # VERSION="${{ steps.info.outputs.version }}" - BLOCK=$(cat < - ${{ steps.cfg.outputs.description }} - ${{ steps.cfg.outputs.qgis_min }} - ${{ steps.cfg.outputs.qgis_max }} - ${{ steps.cfg.outputs.author }} - ${{ steps.cfg.outputs.email }} - ${{ steps.cfg.outputs.homepage }} - ${{ steps.cfg.outputs.tracker }} - ${{ steps.cfg.outputs.repository }} - ${{ steps.upload_asset.outputs.download_url }} - ${{ steps.cfg.outputs.experimental }} - ${{ steps.cfg.outputs.deprecated }} - - EOF - ) + # BLOCK=$(cat < + # ${{ steps.cfg.outputs.description }} + # ${{ steps.cfg.outputs.qgis_min }} + # ${{ steps.cfg.outputs.qgis_max }} + # ${{ steps.cfg.outputs.author }} + # ${{ steps.cfg.outputs.email }} + # ${{ steps.cfg.outputs.homepage }} + # ${{ steps.cfg.outputs.tracker }} + # ${{ steps.cfg.outputs.repository }} + # ${{ steps.upload_asset.outputs.download_url }} + # ${{ steps.cfg.outputs.experimental }} + # ${{ steps.cfg.outputs.deprecated }} + # + # EOF + # ) - { - echo "block<> "$GITHUB_OUTPUT" + # { + # echo "block<> "$GITHUB_OUTPUT" - - name: Dispatch to Repository - shell: bash - run: | - curl -s -X POST \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/json" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ - -d "{ - \"type\": \"plugin-released\", - \"payload\": { - \"plugin\": \"${{ steps.cfg.outputs.name }}\", - \"channel\": \"${{ steps.info.outputs.channel }}\", - \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" - } - }" + # - name: Dispatch to Repository + # shell: bash + # run: | + # curl -s -X POST \ + # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: application/json" \ + # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ + # -d "{ + # \"type\": \"plugin-released\", + # \"payload\": { + # \"plugin\": \"${{ steps.cfg.outputs.name }}\", + # \"channel\": \"${{ steps.info.outputs.channel }}\", + # \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" + # } + # }" From cb71f30c2983a2a8b285e7055496e2d4338bb561 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:27:55 +0100 Subject: [PATCH 38/84] Add release workflow --- .gitea/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 0c71de4..fa3dd45 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -15,6 +15,7 @@ jobs: steps: - name: Notwendige Abhängigkeiten installieren + shell: sh run: | apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false From eb1c0fa6b91eb4866709f4cf46edbe8da4adacfc Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:29:17 +0100 Subject: [PATCH 39/84] Add release workflow --- .gitea/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index fa3dd45..75f763b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,6 +20,9 @@ jobs: apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false + - name: Repository auschecken + uses: actions/checkout@v3 + - name: Debug Info run: | echo "Tag: $GITEA_REF_NAME" From a2d8a1f1cfb502e77337c2ed036a20180d579dc0 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:36:18 +0100 Subject: [PATCH 40/84] Add release workflow --- .gitea/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 75f763b..4a36332 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,6 +20,17 @@ jobs: apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false + - name: Remote URL fixen + run: | + CURRENT_URL=$(git config --get remote.origin.url) + echo "Original URL: $CURRENT_URL" + + # Hostnamen durch RELEASE_URL ersetzen + NEW_URL=$(echo "$CURRENT_URL" | sed "s|://[^/]*|://${{ secrets.RELEASE_TOKEN }}:@${{ vars.RELEASE_URL }}|") + echo "Neue URL: $NEW_URL" + + git remote set-url origin "$NEW_URL" + - name: Repository auschecken uses: actions/checkout@v3 From 78035e08b92517ada88550c129306ad63ec8ac51 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:38:19 +0100 Subject: [PATCH 41/84] Add release workflow --- .gitea/workflows/release.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4a36332..e714719 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,19 +20,11 @@ jobs: apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false - - name: Remote URL fixen - run: | - CURRENT_URL=$(git config --get remote.origin.url) - echo "Original URL: $CURRENT_URL" - - # Hostnamen durch RELEASE_URL ersetzen - NEW_URL=$(echo "$CURRENT_URL" | sed "s|://[^/]*|://${{ secrets.RELEASE_TOKEN }}:@${{ vars.RELEASE_URL }}|") - echo "Neue URL: $NEW_URL" - - git remote set-url origin "$NEW_URL" - - name: Repository auschecken uses: actions/checkout@v3 + with: + repository: https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git + token: ${{ secrets.RELEASE_TOKEN }} - name: Debug Info run: | From c11afa93836427e8700f1ac03e0c2cf8e74a2a4c Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:39:17 +0100 Subject: [PATCH 42/84] Add release workflow --- .gitea/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e714719..e29cb08 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -23,8 +23,7 @@ jobs: - name: Repository auschecken uses: actions/checkout@v3 with: - repository: https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git - token: ${{ secrets.RELEASE_TOKEN }} + repository: ${{ secrets.RELEASE_TOKEN }}:@https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git - name: Debug Info run: | From 739af302d32fe4ae397a146c469350863b744b1b Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:43:56 +0100 Subject: [PATCH 43/84] Add release workflow --- .gitea/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e29cb08..bc6c361 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -23,7 +23,10 @@ jobs: - name: Repository auschecken uses: actions/checkout@v3 with: - repository: ${{ secrets.RELEASE_TOKEN }}:@https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git + repository: AG_QGIS/Plugin_Test_Action.git + fetch-depth: 0 + token: ${{ secrets.RELEASE_TOKEN }} + git_url: https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git - name: Debug Info run: | From 46672dbf2bb0fe014883281e220f517f15bdb411 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:46:59 +0100 Subject: [PATCH 44/84] Add release workflow --- .gitea/workflows/release.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bc6c361..60cfc61 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,13 +20,20 @@ jobs: apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false - - name: Repository auschecken - uses: actions/checkout@v3 - with: - repository: AG_QGIS/Plugin_Test_Action.git - fetch-depth: 0 - token: ${{ secrets.RELEASE_TOKEN }} - git_url: https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git + - name: Clone Gitea repo + run: | + git clone https://$RELEASE_TOKEN:x-oauth-basic@entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git repo + env: + GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }} + + + # - name: Repository auschecken + # uses: actions/checkout@v3 + # with: + # repository: AG_QGIS/Plugin_Test_Action.git + # fetch-depth: 0 + # token: ${{ secrets.RELEASE_TOKEN }} + # git_url: https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git - name: Debug Info run: | From 0ad9d3e1e5e6aa046fc25e010ef3c23d0f17a66e Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 07:57:21 +0100 Subject: [PATCH 45/84] Add release workflow --- .gitea/workflows/release.yml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 60cfc61..12af293 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -20,11 +20,40 @@ jobs: apk add --no-cache git zip curl jq rsync bash git config --global http.sslVerify false - - name: Clone Gitea repo + - name: Code holen run: | - git clone https://$RELEASE_TOKEN:x-oauth-basic@entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git repo + # Tag aus GitHub Actions Kontext extrahieren + TAG="${GITHUB_REF#refs/tags/}" + echo "Tag erkannt: $TAG" + + # Repo-URL dynamisch aus vars und github.repository bauen + REPO_URL="https://${RELEASE_TOKEN}:x-oauth-basic@${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}.git" + echo "Cloning from: $REPO_URL" + + # Repository klonen + git clone "$REPO_URL" repo + cd repo + + # Branch finden, der den Tag enthält + BRANCH=$(git branch -r --contains "$TAG" | head -n 1 | sed 's/origin\///') + + if [ -z "$BRANCH" ]; then + echo "Kein Branch enthält diesen Tag – checkout des Tags direkt" + git checkout "$TAG" + else + echo "Branch gefunden: $BRANCH – checkout" + git checkout "$BRANCH" + fi env: - GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }} + RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} + + + # - name: Repository auschecken + # run: | + # git clone https://$RELEASE_TOKEN:x-oauth-basic@{{ vars.RELEASE_URL }}/${{ github.repository }}.git repo + # cd repo + # env: + # GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }} # - name: Repository auschecken From 6715ce896c9dbd57c4ae2ee3c0f899689a63ca0a Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 08:01:42 +0100 Subject: [PATCH 46/84] Add release workflow --- .gitea/workflows/release.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 12af293..af47b4d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -34,16 +34,7 @@ jobs: git clone "$REPO_URL" repo cd repo - # Branch finden, der den Tag enthält - BRANCH=$(git branch -r --contains "$TAG" | head -n 1 | sed 's/origin\///') - - if [ -z "$BRANCH" ]; then - echo "Kein Branch enthält diesen Tag – checkout des Tags direkt" - git checkout "$TAG" - else - echo "Branch gefunden: $BRANCH – checkout" - git checkout "$BRANCH" - fi + git checkout "$TAG" env: RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} From 2e3325df164299cc87c02a42d6625220e0c8a04a Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 08:16:01 +0100 Subject: [PATCH 47/84] Add release workflow --- .gitea/workflows/release.yml | 40 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index af47b4d..9a2fbd9 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -24,11 +24,11 @@ jobs: run: | # Tag aus GitHub Actions Kontext extrahieren TAG="${GITHUB_REF#refs/tags/}" - echo "Tag erkannt: $TAG" + echo "DEBUG | Tag erkannt: $TAG" # Repo-URL dynamisch aus vars und github.repository bauen REPO_URL="https://${RELEASE_TOKEN}:x-oauth-basic@${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}.git" - echo "Cloning from: $REPO_URL" + echo "DEBUG | Klone von: $REPO_URL" # Repository klonen git clone "$REPO_URL" repo @@ -38,35 +38,31 @@ jobs: env: RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} + - name: Version und Kanal bestimmen + id: info + run: | + TAG="${{ github.ref_name }}" + VERSION="${TAG#v}" - # - name: Repository auschecken - # run: | - # git clone https://$RELEASE_TOKEN:x-oauth-basic@{{ vars.RELEASE_URL }}/${{ github.repository }}.git repo - # cd repo - # env: - # GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }} + case "$TAG" in + *-dev*) CHANNEL="unstable" ;; + *-beta*) CHANNEL="testing" ;; + *) CHANNEL="stable" ;; + esac + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + + echo "DEBUG | Version: $VERSION" + echo "DEBUG | Kanal: $CHANNEL" - # - name: Repository auschecken - # uses: actions/checkout@v3 - # with: - # repository: AG_QGIS/Plugin_Test_Action.git - # fetch-depth: 0 - # token: ${{ secrets.RELEASE_TOKEN }} - # git_url: https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action.git - name: Debug Info run: | echo "Tag: $GITEA_REF_NAME" uname -a - # - name: Checkout - # run: | - # git clone --depth 1 \ - # --branch ${{ github.ref_name }} \ - # https://x-access-token:${{ secrets.RELEASE_TOKEN }}@${{ vars.RELEASE_URL }}/${{ github.repository }}.git \ - # . - # - name: Determine version and channel # id: info # run: | From 141a867dd35c92ca2680200cd1cbc3b055502042 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 08:17:19 +0100 Subject: [PATCH 48/84] Add release workflow --- .gitea/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9a2fbd9..19ccac3 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -45,9 +45,9 @@ jobs: VERSION="${TAG#v}" case "$TAG" in - *-dev*) CHANNEL="unstable" ;; - *-beta*) CHANNEL="testing" ;; - *) CHANNEL="stable" ;; + *-unstable*) CHANNEL="unstable" ;; + *-testing*) CHANNEL="testing" ;; + *) CHANNEL="stable" ;; esac echo "version=${VERSION}" >> $GITHUB_OUTPUT From 07ec930161b90ddd681fbaf4afa23b91c800d623 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 08:52:35 +0100 Subject: [PATCH 49/84] metadata.txt als Template nach .plugin verschoben --- metadata.txt => .plugin/metadata.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename metadata.txt => .plugin/metadata.template (73%) diff --git a/metadata.txt b/.plugin/metadata.template similarity index 73% rename from metadata.txt rename to .plugin/metadata.template index 0fac9f7..ea4a937 100644 --- a/metadata.txt +++ b/.plugin/metadata.template @@ -3,11 +3,11 @@ name=LNO Sachsen | Plugin Test Action qgisMinimumVersion=3.0 qgisMaximumVersion=3.99 description=Test plugin for release pipeline -version=26.3.1 -author=Michael Otto -email=michael.otto@landkreis-mittelsachsen.de +version=@VERSION@ +author=Daniel Helbig, Michael Otto +email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de homepage=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action tracker=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/issues repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action -experimental=False +experimental=True deprecated=False \ No newline at end of file From 156c59e7079d94f7856765ca4cb888c6dc8186cc Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 08:53:12 +0100 Subject: [PATCH 50/84] Add release workflow --- .gitea/workflows/release.yml | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 19ccac3..bd9d80e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -39,7 +39,7 @@ jobs: RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} - name: Version und Kanal bestimmen - id: info + id: releaseinfo run: | TAG="${{ github.ref_name }}" VERSION="${TAG#v}" @@ -56,6 +56,20 @@ jobs: echo "DEBUG | Version: $VERSION" echo "DEBUG | Kanal: $CHANNEL" + - name: metadata.txt erzeugen + run: | + cd repo + + VERSION="${{ steps.releaseinfo.outputs.version }}" + + # Vorlage kopieren + cp .plugin/metadata.template metadata.txt + + # Platzhalter ersetzen + sed -i "s/@VERSION@/${VERSION}/g" metadata.txt + + echo "DEBUG | metadata.txt erzeugt:" + cat metadata.txt - name: Debug Info @@ -63,25 +77,6 @@ jobs: echo "Tag: $GITEA_REF_NAME" uname -a - # - name: Determine version and channel - # id: info - # run: | - # TAG="${{ github.ref_name }}" - # VERSION="${TAG#v}" - - # case "$TAG" in - # *-dev*) CHANNEL="dev" ;; - # *-beta*) CHANNEL="beta" ;; - # *) CHANNEL="stable" ;; - # esac - - # echo "version=${VERSION}" >> $GITHUB_OUTPUT - # echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT - - # # Nur fürs Log: - # echo "VERSION: $VERSION" - # echo "CHANNEL: $CHANNEL" - # - name: Read plugin.cfg # id: cfg # run: | From 9bdff6a681bb70df4f405ff7485c6f537f2bb246 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 08:59:04 +0100 Subject: [PATCH 51/84] Add release workflow --- .gitea/workflows/release.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bd9d80e..3a31650 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -71,6 +71,44 @@ jobs: echo "DEBUG | metadata.txt erzeugt:" cat metadata.txt + - name: ZIP-Datei erstellen + id: zip + run: | + cd repo + + # Plugin-Ordnername aus .plugin/zip_folder lesen + ZIP_FOLDER=$(cat .plugin/zip_folder) + echo "DEBUG | Plugin-Ordnername: $ZIP_FOLDER" + + VERSION="${{ steps.releaseinfo.outputs.version }}" + REPO_NAME="${GITHUB_REPOSITORY##*/}" + ZIP_NAME="${REPO_NAME}-${VERSION}.zip" + + echo "DEBUG | ZIP wird erzeugt: $ZIP_NAME" + + # Temporären Build-Ordner anlegen + mkdir -p dist/${ZIP_FOLDER} + + # Plugin-Dateien kopieren (alles außer CI-/Meta-Verzeichnisse) + rsync -a \ + --exclude='.git' \ + --exclude='.gitea' \ + --exclude='.plugin' \ + --exclude='dist' \ + ./ dist/${ZIP_FOLDER}/ + + # ZIP erzeugen + cd dist + zip -r "${ZIP_NAME}" "${ZIP_FOLDER}/" \ + -x "*.pyc" -x "*/__pycache__/*" + cd .. + + # ZIP-Name für spätere Steps bereitstellen + echo "zip_name=${ZIP_NAME}" >> $GITHUB_OUTPUT + + echo "DEBUG | ZIP-Datei erzeugt: dist/${ZIP_NAME}" + + - name: Debug Info run: | From b8850219415fd848d4828506e9e48199b5badda7 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:01:04 +0100 Subject: [PATCH 52/84] Release v18 --- .plugin/zip_folder | 1 + 1 file changed, 1 insertion(+) create mode 100644 .plugin/zip_folder diff --git a/.plugin/zip_folder b/.plugin/zip_folder new file mode 100644 index 0000000..4572dbb --- /dev/null +++ b/.plugin/zip_folder @@ -0,0 +1 @@ +sn_test \ No newline at end of file From 3f41de4fac85cb2c0479d3d754e7b8bb14106ba2 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:04:39 +0100 Subject: [PATCH 53/84] Release v19 --- .gitea/workflows/release.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3a31650..cfd66a1 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -108,6 +108,48 @@ jobs: echo "DEBUG | ZIP-Datei erzeugt: dist/${ZIP_NAME}" + - name: Gitea‑Release erstellen + id: create_release + run: | + TAG="${{ github.ref_name }}" + VERSION="${{ steps.releaseinfo.outputs.version }}" + CHANNEL="${{ steps.releaseinfo.outputs.channel }}" + + echo "Erstelle Release für Tag: $TAG" + echo "Version: $VERSION" + echo "Kanal: $CHANNEL" + + API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases" + + # JSON‑Body erzeugen + JSON=$(jq -n \ + --arg tag "$TAG" \ + --arg name "Version $VERSION" \ + --arg body "Automatisch erzeugtes Release für Kanal: $CHANNEL" \ + '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}') + + echo "Sende API‑Request an: $API_URL" + echo "JSON‑Payload:" + echo "$JSON" + + # Release erstellen + API_RESPONSE=$(curl -s -X POST "$API_URL" \ + -H "accept: application/json" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "$JSON") + + RELEASE_ID=$(echo "$API_RESPONSE" | jq -r '.id') + + if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then + echo "Fehler beim Erstellen des Releases!" + echo "API‑Antwort:" + echo "$API_RESPONSE" + exit 1 + fi + + echo "Release erfolgreich erstellt. ID: $RELEASE_ID" + echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT - name: Debug Info From 18e76984bbce0884d019a3d75bdbeb53ed78f072 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:11:49 +0100 Subject: [PATCH 54/84] Release v21 --- .gitea/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index cfd66a1..afff978 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -151,6 +151,33 @@ jobs: echo "Release erfolgreich erstellt. ID: $RELEASE_ID" echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT + - name: ZIP-Datei hochladen + run: | + RELEASE_ID="${{ steps.create_release.outputs.release_id }}" + ZIP_NAME="${{ steps.zip.outputs.zip_name }}" + + echo "Lade ZIP-Datei hoch: $ZIP_NAME" + echo "Release-ID: $RELEASE_ID" + + API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${ZIP_NAME}" + + curl -s -X POST "$API_URL" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/zip" \ + --data-binary "@repo/dist/${ZIP_NAME}" \ + -o upload_response.json + + echo "Upload-Antwort:" + cat upload_response.json + + # Optional: Fehlerprüfung + if jq -e '.id' upload_response.json >/dev/null 2>&1; then + echo "ZIP erfolgreich hochgeladen." + else + echo "Fehler beim Hochladen der ZIP!" + exit 1 + fi + - name: Debug Info run: | From c73cde2e57b990642a1da621e7b8c158be102acc Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:12:42 +0100 Subject: [PATCH 55/84] Release v22 --- .gitea/workflows/release.yml | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index afff978..a968998 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -151,32 +151,32 @@ jobs: echo "Release erfolgreich erstellt. ID: $RELEASE_ID" echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT - - name: ZIP-Datei hochladen - run: | - RELEASE_ID="${{ steps.create_release.outputs.release_id }}" - ZIP_NAME="${{ steps.zip.outputs.zip_name }}" + - name: ZIP-Datei hochladen + run: | + RELEASE_ID="${{ steps.create_release.outputs.release_id }}" + ZIP_NAME="${{ steps.zip.outputs.zip_name }}" - echo "Lade ZIP-Datei hoch: $ZIP_NAME" - echo "Release-ID: $RELEASE_ID" + echo "Lade ZIP-Datei hoch: $ZIP_NAME" + echo "Release-ID: $RELEASE_ID" - API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${ZIP_NAME}" + API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${ZIP_NAME}" - curl -s -X POST "$API_URL" \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/zip" \ - --data-binary "@repo/dist/${ZIP_NAME}" \ - -o upload_response.json + curl -s -X POST "$API_URL" \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/zip" \ + --data-binary "@repo/dist/${ZIP_NAME}" \ + -o upload_response.json - echo "Upload-Antwort:" - cat upload_response.json + echo "Upload-Antwort:" + cat upload_response.json - # Optional: Fehlerprüfung - if jq -e '.id' upload_response.json >/dev/null 2>&1; then - echo "ZIP erfolgreich hochgeladen." - else - echo "Fehler beim Hochladen der ZIP!" - exit 1 - fi + # Optional: Fehlerprüfung + if jq -e '.id' upload_response.json >/dev/null 2>&1; then + echo "ZIP erfolgreich hochgeladen." + else + echo "Fehler beim Hochladen der ZIP!" + exit 1 + fi - name: Debug Info From efc695457f08be9b43bfe3d4402dc7acc32a571d Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:23:18 +0100 Subject: [PATCH 56/84] Release v23 --- .gitea/workflows/release.yml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a968998..029da64 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -178,6 +178,53 @@ jobs: exit 1 fi + - name: Payload erzeugen + id: payload + run: | + cd repo + + PLUGIN_NAME=$(grep '^name=' metadata.txt | cut -d '=' -f2) + DESCRIPTION=$(grep '^description=' metadata.txt | cut -d '=' -f2) + AUTHOR=$(grep '^author=' metadata.txt | cut -d '=' -f2) + EMAIL=$(grep '^email=' metadata.txt | cut -d '=' -f2) + + VERSION="${{ steps.releaseinfo.outputs.version }}" + CHANNEL="${{ steps.releaseinfo.outputs.channel }}" + ZIP_NAME="${{ steps.zip.outputs.zip_name }}" + CHANGELOG="${{ steps.changelog.outputs.log }}" + + DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" + + jq -n \ + --arg plugin "$PLUGIN_NAME" \ + --arg version "$VERSION" \ + --arg channel "$CHANNEL" \ + --arg description "$DESCRIPTION" \ + --arg author "$AUTHOR" \ + --arg email "$EMAIL" \ + --arg url "$DOWNLOAD_URL" \ + --arg changelog "$CHANGELOG" \ + '{ + plugin: $plugin, + version: $version, + channel: $channel, + description: $description, + author: $author, + email: $email, + url: $url, + changelog: $changelog + }' > payload.json + + echo "payload=$(cat payload.json)" >> $GITHUB_OUTPUT + + - name: Repository aktualisieren + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{\"event_type\": \"update_plugin\", \"client_payload\": ${{ steps.payload.outputs.payload }}}" \ + https://${{ vars.RELEASE_URL }}/api/v1/repos//Repository/dispatches + - name: Debug Info run: | From 049c0f64ed4944c67352e508a9d1ad964ce9d62e Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:26:38 +0100 Subject: [PATCH 57/84] Release v24 --- .gitea/workflows/release.yml | 44 +++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 029da64..eccc2ae 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -217,13 +217,45 @@ jobs: echo "payload=$(cat payload.json)" >> $GITHUB_OUTPUT - - name: Repository aktualisieren + - name: Payload erzeugen run: | - curl -X POST \ - -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - -H "Content-Type: application/json" \ - -d "{\"event_type\": \"update_plugin\", \"client_payload\": ${{ steps.payload.outputs.payload }}}" \ - https://${{ vars.RELEASE_URL }}/api/v1/repos//Repository/dispatches + cd repo + + PLUGIN_NAME=$(grep '^name=' metadata.txt | cut -d '=' -f2) + DESCRIPTION=$(grep '^description=' metadata.txt | cut -d '=' -f2) + AUTHOR=$(grep '^author=' metadata.txt | cut -d '=' -f2) + EMAIL=$(grep '^email=' metadata.txt | cut -d '=' -f2) + + VERSION="${{ steps.releaseinfo.outputs.version }}" + CHANNEL="${{ steps.releaseinfo.outputs.channel }}" + ZIP_NAME="${{ steps.zip.outputs.zip_name }}" + CHANGELOG="${{ steps.changelog.outputs.log }}" + + DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" + + jq -n \ + --arg plugin "$PLUGIN_NAME" \ + --arg version "$VERSION" \ + --arg channel "$CHANNEL" \ + --arg description "$DESCRIPTION" \ + --arg author "$AUTHOR" \ + --arg email "$EMAIL" \ + --arg url "$DOWNLOAD_URL" \ + --arg changelog "$CHANGELOG" \ + '{ + plugin: $plugin, + version: $version, + channel: $channel, + description: $description, + author: $author, + email: $email, + url: $url, + changelog: $changelog + }' > payload.json + + echo "Payload:" + cat payload.json + - name: Debug Info From 88a62af7c863dda4e1c840d033e83dfcb47ecd04 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:27:23 +0100 Subject: [PATCH 58/84] Release v25 --- .gitea/workflows/release.yml | 39 ------------------------------------ 1 file changed, 39 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index eccc2ae..e2052d3 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -178,45 +178,6 @@ jobs: exit 1 fi - - name: Payload erzeugen - id: payload - run: | - cd repo - - PLUGIN_NAME=$(grep '^name=' metadata.txt | cut -d '=' -f2) - DESCRIPTION=$(grep '^description=' metadata.txt | cut -d '=' -f2) - AUTHOR=$(grep '^author=' metadata.txt | cut -d '=' -f2) - EMAIL=$(grep '^email=' metadata.txt | cut -d '=' -f2) - - VERSION="${{ steps.releaseinfo.outputs.version }}" - CHANNEL="${{ steps.releaseinfo.outputs.channel }}" - ZIP_NAME="${{ steps.zip.outputs.zip_name }}" - CHANGELOG="${{ steps.changelog.outputs.log }}" - - DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" - - jq -n \ - --arg plugin "$PLUGIN_NAME" \ - --arg version "$VERSION" \ - --arg channel "$CHANNEL" \ - --arg description "$DESCRIPTION" \ - --arg author "$AUTHOR" \ - --arg email "$EMAIL" \ - --arg url "$DOWNLOAD_URL" \ - --arg changelog "$CHANGELOG" \ - '{ - plugin: $plugin, - version: $version, - channel: $channel, - description: $description, - author: $author, - email: $email, - url: $url, - changelog: $changelog - }' > payload.json - - echo "payload=$(cat payload.json)" >> $GITHUB_OUTPUT - - name: Payload erzeugen run: | cd repo From 75b7e8073adad48330350038e8f5cc26e9f40f1e Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:28:31 +0100 Subject: [PATCH 59/84] Release v26 --- .gitea/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e2052d3..b98ac67 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -217,6 +217,13 @@ jobs: echo "Payload:" cat payload.json + - name: Repository aktualisieren + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + -H "Content-Type: application/json" \ + --data-binary @repo/payload.json \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos//Repository/dispatches?event_type=update_plugin" - name: Debug Info From 0ce29c9e848ef75a801737bda6aa60996542e2dd Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:36:12 +0100 Subject: [PATCH 60/84] Release v27 --- .gitea/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index b98ac67..5d49950 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -219,11 +219,15 @@ jobs: - name: Repository aktualisieren run: | + OWNER="AG_QGIS" # z. B. dein Benutzername oder deine Organisation + WORKFLOW="update.yml" # Name der Workflow-Datei im Repository-Repo + curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - --data-binary @repo/payload.json \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos//Repository/dispatches?event_type=update_plugin" + -d @repo/payload.json \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + - name: Debug Info From 2e65ec4bc45188153658630dbf02a0b89a36e6e0 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:44:03 +0100 Subject: [PATCH 61/84] Release v29 --- .gitea/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5d49950..dd9f85e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -225,9 +225,15 @@ jobs: curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - -d @repo/payload.json \ + -d "{\"ref\": \"feature/release\", \"inputs\": {}, \"event_type\": \"update_plugin\", \"client_payload\": $(cat repo/payload.json) }" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + # curl -X POST \ + # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: application/json" \ + # -d @repo/payload.json \ + # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + - name: Debug Info From 067e0f31702241f36966ca46a76aeb157965d5c9 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 10:08:03 +0100 Subject: [PATCH 62/84] Release v33 --- .gitea/workflows/release.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index dd9f85e..ed03c91 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -219,14 +219,26 @@ jobs: - name: Repository aktualisieren run: | - OWNER="AG_QGIS" # z. B. dein Benutzername oder deine Organisation - WORKFLOW="update.yml" # Name der Workflow-Datei im Repository-Repo + OWNER="AG_QGIS" + WORKFLOW="update.yml" curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - -d "{\"ref\": \"feature/release\", \"inputs\": {}, \"event_type\": \"update_plugin\", \"client_payload\": $(cat repo/payload.json) }" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + -d "{\"ref\": \"feature/release\", \"client_payload\": $(cat repo/payload.json) }" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches?event_type=update_plugin" + + + # - name: Repository aktualisieren + # run: | + # OWNER="AG_QGIS" # z. B. dein Benutzername oder deine Organisation + # WORKFLOW="update.yml" # Name der Workflow-Datei im Repository-Repo + + # curl -X POST \ + # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: application/json" \ + # -d "{\"ref\": \"feature/release\", \"inputs\": {}, \"event_type\": \"update_plugin\", \"client_payload\": $(cat repo/payload.json) }" \ + # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" # curl -X POST \ # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ From c55dedbbe182f34224454b8632e8512ba8f80af3 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 10:10:02 +0100 Subject: [PATCH 63/84] Release v34 --- .gitea/workflows/release.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ed03c91..c00c91b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -222,11 +222,20 @@ jobs: OWNER="AG_QGIS" WORKFLOW="update.yml" + # JSON als STRING escapen + PAYLOAD=$(jq -Rs . < repo/payload.json) + curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - -d "{\"ref\": \"feature/release\", \"client_payload\": $(cat repo/payload.json) }" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches?event_type=update_plugin" + -d "{ + \"ref\": \"feature/release\", + \"inputs\": { + \"client_payload\": $PAYLOAD + } + }" \ + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + # - name: Repository aktualisieren From af43bfeab9eff50dfe32f99fecaa6bbbd3bc5603 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 10:13:36 +0100 Subject: [PATCH 64/84] Release v36 --- .gitea/workflows/release.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c00c91b..7589add 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -222,22 +222,21 @@ jobs: OWNER="AG_QGIS" WORKFLOW="update.yml" - # JSON als STRING escapen - PAYLOAD=$(jq -Rs . < repo/payload.json) + # payload.json in Base64 umwandeln (Alpine hat base64) + PAYLOAD_B64=$(base64 -w0 repo/payload.json) + + # JSON für Gitea bauen + JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ - -d "{ - \"ref\": \"feature/release\", - \"inputs\": { - \"client_payload\": $PAYLOAD - } - }" \ + -d "$JSON" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + # - name: Repository aktualisieren # run: | # OWNER="AG_QGIS" # z. B. dein Benutzername oder deine Organisation From 44aae815f586fe4edfbd3e10114136c01e56d216 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 10:15:05 +0100 Subject: [PATCH 65/84] Release v37 --- .gitea/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7589add..3e06ae2 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -222,12 +222,15 @@ jobs: OWNER="AG_QGIS" WORKFLOW="update.yml" - # payload.json in Base64 umwandeln (Alpine hat base64) + # payload.json in Base64 umwandeln PAYLOAD_B64=$(base64 -w0 repo/payload.json) # JSON für Gitea bauen JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" + echo "Sende JSON:" + echo "$JSON" + curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ @@ -237,6 +240,7 @@ jobs: + # - name: Repository aktualisieren # run: | # OWNER="AG_QGIS" # z. B. dein Benutzername oder deine Organisation From 2cb504ba51db70dc68456ca0ee06b700d66a265a Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 10:18:46 +0100 Subject: [PATCH 66/84] Release v38 --- .gitea/workflows/release.yml | 223 +---------------------------------- 1 file changed, 5 insertions(+), 218 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3e06ae2..b6d735c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: Release Plugin on: @@ -220,227 +219,15 @@ jobs: - name: Repository aktualisieren run: | OWNER="AG_QGIS" - WORKFLOW="update.yml" - - # payload.json in Base64 umwandeln PAYLOAD_B64=$(base64 -w0 repo/payload.json) - # JSON für Gitea bauen - JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" - - echo "Sende JSON:" - echo "$JSON" + JSON=$(jq -n --arg p "$PAYLOAD_B64" '{ + event_type: "update_plugin", + client_payload: { payload: $p } + }') curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ -d "$JSON" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" - - - - - - # - name: Repository aktualisieren - # run: | - # OWNER="AG_QGIS" # z. B. dein Benutzername oder deine Organisation - # WORKFLOW="update.yml" # Name der Workflow-Datei im Repository-Repo - - # curl -X POST \ - # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - # -H "Content-Type: application/json" \ - # -d "{\"ref\": \"feature/release\", \"inputs\": {}, \"event_type\": \"update_plugin\", \"client_payload\": $(cat repo/payload.json) }" \ - # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" - - # curl -X POST \ - # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - # -H "Content-Type: application/json" \ - # -d @repo/payload.json \ - # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" - - - - - name: Debug Info - run: | - echo "Tag: $GITEA_REF_NAME" - uname -a - - # - name: Read plugin.cfg - # id: cfg - # run: | - # CFG=".plugin/plugin.cfg" - - # get_value() { - # grep -i "^$1" "$CFG" | head -1 | cut -d= -f2- | tr -d '\r' | xargs - # } - - # echo "zip_folder=$(get_value zip_folder)" >> $GITHUB_OUTPUT - # echo "name=$(get_value name)" >> $GITHUB_OUTPUT - # echo "qgis_min=$(get_value qgisMinimumVersion)" >> $GITHUB_OUTPUT - # echo "qgis_max=$(get_value qgisMaximumVersion)" >> $GITHUB_OUTPUT - # echo "description=$(get_value description)" >> $GITHUB_OUTPUT - # echo "author=$(get_value author)" >> $GITHUB_OUTPUT - # echo "email=$(get_value email)" >> $GITHUB_OUTPUT - # echo "homepage=$(get_value homepage)" >> $GITHUB_OUTPUT - # echo "tracker=$(get_value tracker)" >> $GITHUB_OUTPUT - # echo "repository=$(get_value repository)" >> $GITHUB_OUTPUT - # echo "experimental=$(get_value experimental)" >> $GITHUB_OUTPUT - # echo "deprecated=$(get_value deprecated)" >> $GITHUB_OUTPUT - - # # Nur fürs Log: - # echo "zip_folder=$(get_value zip_folder)" - # echo "name=$(get_value name)" - # echo "qgis_min=$(get_value qgisMinimumVersion)" - # echo "qgis_max=$(get_value qgisMaximumVersion)" - # echo "description=$(get_value description)" - # echo "author=$(get_value author)" - # echo "email=$(get_value email)" - # echo "homepage=$(get_value homepage)" - # echo "tracker=$(get_value tracker)" - # echo "repository=$(get_value repository)" - # echo "experimental=$(get_value experimental)" - # echo "deprecated=$(get_value deprecated)" - - # - name: Generate metadata.txt - # run: | - # VERSION="${{ steps.info.outputs.version }}" - # CHANGELOG=$(cat .plugin/changelog.txt) - - # cat > metadata.txt << EOF - # [general] - # name=${{ steps.cfg.outputs.name }} - # version=${VERSION} - # qgisMinimumVersion=${{ steps.cfg.outputs.qgis_min }} - # qgisMaximumVersion=${{ steps.cfg.outputs.qgis_max }} - # description=${{ steps.cfg.outputs.description }} - # author=${{ steps.cfg.outputs.author }} - # email=${{ steps.cfg.outputs.email }} - # homepage=${{ steps.cfg.outputs.homepage }} - # tracker=${{ steps.cfg.outputs.tracker }} - # repository=${{ steps.cfg.outputs.repository }} - # experimental=${{ steps.cfg.outputs.experimental }} - # deprecated=${{ steps.cfg.outputs.deprecated }} - # changelog=${VERSION} - # $(cat .plugin/changelog.txt) - # EOF - - # # Nur fürs Log: - # cat metadata.txt - - # - name: Build plugin ZIP - # run: | - # REPO_NAME="${{ github.event.repository.name }}" - # ZIP_FOLDER="${{ steps.cfg.outputs.zip_folder }}" - # VERSION="${{ steps.info.outputs.version }}" - # ZIP_NAME="${REPO_NAME}-${VERSION}.zip" - - # # Temporären Ordner mit zip_folder-Namen anlegen - # mkdir -p dist/${ZIP_FOLDER} - - # # Alle Plugin-Dateien hineinkopieren (ohne .gitea, .plugin, dist) - # rsync -a \ - # --exclude='.gitea' \ - # --exclude='.plugin' \ - # --exclude='.git' \ - # --exclude='dist' \ - # ./ dist/${ZIP_FOLDER}/ - - # # ZIP bauen - # cd dist - # zip -r ${ZIP_NAME} ${ZIP_FOLDER}/ \ - # -x "*.pyc" -x "*/__pycache__/*" - # cd .. - - # echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV - - # # Nur fürs Log: - # echo "ZIP_NAME=${ZIP_NAME}" - - # - name: Create Gitea Release - # id: create_release - # run: | - # echo "Kommuniziere mit Gitea API über HTTPS..." - # API_RESPONSE=$(curl -s -k -X POST "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases" \ - # -H "accept: application/json" \ - # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - # -H "Content-Type: application/json" \ - # -d '{ - # "body": "Dieses Release wurde automatisch vom Gitea Runner erstellt.", - # "draft": false, - # "name": "Version ${{ github.ref_name }}", - # "prerelease": false, - # "tag_name": "${{ github.ref_name }}" - # }') - - # RELEASE_ID=$(echo $API_RESPONSE | jq -r '.id') - - # if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then - # echo "Fehler beim Erstellen des Releases. API Antwort:" - # echo $API_RESPONSE - # exit 1 - # fi - - # echo "Release ID: $RELEASE_ID" - # echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV - - # - name: Upload ZIP asset - # id: upload_asset - # run: | - # echo "Lade release_${{ github.ref_name }}.zip (${{ env.ZIP_NAME }}) hoch..." - - # RESPONSE=$(curl -s -k -X POST \ - # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ env.ZIP_NAME }}" \ - # -H "accept: application/json" \ - # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - # -H "Content-Type: multipart/form-data" \ - # -F "attachment=@dist/${{ env.ZIP_NAME }}") - - # echo "Upload response: $RESPONSE" - - # DOWNLOAD_URL=$(echo "$RESPONSE" | grep -o '"browser_download_url":"[^"]*' | cut -d'"' -f4) - # echo "download_url=${DOWNLOAD_URL}" >> $GITHUB_OUTPUT - - # - name: Build XML block - # id: xmlblock - # run: | - # NAME="${{ steps.cfg.outputs.name }}" - # VERSION="${{ steps.info.outputs.version }}" - - # BLOCK=$(cat < - # ${{ steps.cfg.outputs.description }} - # ${{ steps.cfg.outputs.qgis_min }} - # ${{ steps.cfg.outputs.qgis_max }} - # ${{ steps.cfg.outputs.author }} - # ${{ steps.cfg.outputs.email }} - # ${{ steps.cfg.outputs.homepage }} - # ${{ steps.cfg.outputs.tracker }} - # ${{ steps.cfg.outputs.repository }} - # ${{ steps.upload_asset.outputs.download_url }} - # ${{ steps.cfg.outputs.experimental }} - # ${{ steps.cfg.outputs.deprecated }} - # - # EOF - # ) - - # { - # echo "block<> "$GITHUB_OUTPUT" - - # - name: Dispatch to Repository - # shell: bash - # run: | - # curl -s -X POST \ - # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - # -H "Content-Type: application/json" \ - # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${{ github.repository_owner }}/Repository/dispatches" \ - # -d "{ - # \"type\": \"plugin-released\", - # \"payload\": { - # \"plugin\": \"${{ steps.cfg.outputs.name }}\", - # \"channel\": \"${{ steps.info.outputs.channel }}\", - # \"xml_block\": \"${{ steps.xmlblock.outputs.block }}\" - # } - # }" + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/dispatches" \ No newline at end of file From f77a8d34a0bc4ec9de676b3d9228f2f643e4bb55 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 10:21:27 +0100 Subject: [PATCH 67/84] Release v39 --- .gitea/workflows/release.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index b6d735c..0077fef 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -219,15 +219,20 @@ jobs: - name: Repository aktualisieren run: | OWNER="AG_QGIS" + WORKFLOW="update.yml" + + # payload.json in Base64 umwandeln PAYLOAD_B64=$(base64 -w0 repo/payload.json) - JSON=$(jq -n --arg p "$PAYLOAD_B64" '{ - event_type: "update_plugin", - client_payload: { payload: $p } - }') + # JSON für Gitea bauen + JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" + + echo "Sende JSON:" + echo "$JSON" curl -X POST \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Content-Type: application/json" \ -d "$JSON" \ - "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/dispatches" \ No newline at end of file + "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + From a69d00df31d339ff5b11e59358792890c76cb612 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 11:14:22 +0100 Subject: [PATCH 68/84] auf plugin.info umgestellt --- .gitea/workflows/release.yml | 169 +++++++++++++++++++---- .gitignore | 3 +- .plugin/zip_folder | 1 - .plugin/plugin.cfg => plugin.info | 17 ++- {.plugin => templates}/metadata.template | 4 +- 5 files changed, 152 insertions(+), 42 deletions(-) delete mode 100644 .plugin/zip_folder rename .plugin/plugin.cfg => plugin.info (66%) rename {.plugin => templates}/metadata.template (85%) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 0077fef..f5c9ce8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -55,28 +55,95 @@ jobs: echo "DEBUG | Version: $VERSION" echo "DEBUG | Kanal: $CHANNEL" + # - name: metadata.txt erzeugen + # run: | + # cd repo + + # VERSION="${{ steps.releaseinfo.outputs.version }}" + + # # Vorlage kopieren + # cp .plugin/metadata.template metadata.txt + + # # Platzhalter ersetzen + # sed -i "s/@VERSION@/${VERSION}/g" metadata.txt + + # echo "DEBUG | metadata.txt erzeugt:" + # cat metadata.txt + + - name: plugin.info einlesen + id: info + run: | + cd repo + while IFS='=' read -r key value; do + echo "$key=$value" >> $GITHUB_OUTPUT + done < plugin.info + + echo "DEBUG | plugin.info geladen:" + cat plugin.info + - name: metadata.txt erzeugen run: | cd repo - VERSION="${{ steps.releaseinfo.outputs.version }}" + TEMPLATE=".plugin/metadata.template" + OUT="metadata.txt" - # Vorlage kopieren - cp .plugin/metadata.template metadata.txt + CONTENT=$(cat "$TEMPLATE") - # Platzhalter ersetzen - sed -i "s/@VERSION@/${VERSION}/g" metadata.txt + CONTENT="${CONTENT//\{\{NAME\}\}/${{ steps.info.outputs.name }}}" + CONTENT="${CONTENT//\{\{DESCRIPTION\}\}/${{ steps.info.outputs.description }}}" + CONTENT="${CONTENT//\{\{AUTHOR\}\}/${{ steps.info.outputs.author }}}" + CONTENT="${CONTENT//\{\{EMAIL\}\}/${{ steps.info.outputs.email }}}" + CONTENT="${CONTENT//\{\{VERSION\}\}/${{ steps.releaseinfo.outputs.version }}}" + + printf "%s\n" "$CONTENT" > "$OUT" echo "DEBUG | metadata.txt erzeugt:" cat metadata.txt + # - name: ZIP-Datei erstellen + # id: zip + # run: | + # cd repo + + # # Plugin-Ordnername aus .plugin/zip_folder lesen + # ZIP_FOLDER=$(cat .plugin/zip_folder) + # echo "DEBUG | Plugin-Ordnername: $ZIP_FOLDER" + + # VERSION="${{ steps.releaseinfo.outputs.version }}" + # REPO_NAME="${GITHUB_REPOSITORY##*/}" + # ZIP_NAME="${REPO_NAME}-${VERSION}.zip" + + # echo "DEBUG | ZIP wird erzeugt: $ZIP_NAME" + + # # Temporären Build-Ordner anlegen + # mkdir -p dist/${ZIP_FOLDER} + + # # Plugin-Dateien kopieren (alles außer CI-/Meta-Verzeichnisse) + # rsync -a \ + # --exclude='.git' \ + # --exclude='.gitea' \ + # --exclude='.plugin' \ + # --exclude='dist' \ + # ./ dist/${ZIP_FOLDER}/ + + # # ZIP erzeugen + # cd dist + # zip -r "${ZIP_NAME}" "${ZIP_FOLDER}/" \ + # -x "*.pyc" -x "*/__pycache__/*" + # cd .. + + # # ZIP-Name für spätere Steps bereitstellen + # echo "zip_name=${ZIP_NAME}" >> $GITHUB_OUTPUT + + # echo "DEBUG | ZIP-Datei erzeugt: dist/${ZIP_NAME}" + - name: ZIP-Datei erstellen id: zip run: | cd repo - # Plugin-Ordnername aus .plugin/zip_folder lesen - ZIP_FOLDER=$(cat .plugin/zip_folder) + ZIP_FOLDER="${{ steps.info.outputs.zip_folder }}" echo "DEBUG | Plugin-Ordnername: $ZIP_FOLDER" VERSION="${{ steps.releaseinfo.outputs.version }}" @@ -85,10 +152,8 @@ jobs: echo "DEBUG | ZIP wird erzeugt: $ZIP_NAME" - # Temporären Build-Ordner anlegen mkdir -p dist/${ZIP_FOLDER} - # Plugin-Dateien kopieren (alles außer CI-/Meta-Verzeichnisse) rsync -a \ --exclude='.git' \ --exclude='.gitea' \ @@ -96,17 +161,13 @@ jobs: --exclude='dist' \ ./ dist/${ZIP_FOLDER}/ - # ZIP erzeugen cd dist zip -r "${ZIP_NAME}" "${ZIP_FOLDER}/" \ -x "*.pyc" -x "*/__pycache__/*" cd .. - # ZIP-Name für spätere Steps bereitstellen echo "zip_name=${ZIP_NAME}" >> $GITHUB_OUTPUT - echo "DEBUG | ZIP-Datei erzeugt: dist/${ZIP_NAME}" - - name: Gitea‑Release erstellen id: create_release run: | @@ -177,31 +238,64 @@ jobs: exit 1 fi + # - name: Payload erzeugen + # run: | + # cd repo + + # PLUGIN_NAME=$(grep '^name=' metadata.txt | cut -d '=' -f2) + # DESCRIPTION=$(grep '^description=' metadata.txt | cut -d '=' -f2) + # AUTHOR=$(grep '^author=' metadata.txt | cut -d '=' -f2) + # EMAIL=$(grep '^email=' metadata.txt | cut -d '=' -f2) + + # VERSION="${{ steps.releaseinfo.outputs.version }}" + # CHANNEL="${{ steps.releaseinfo.outputs.channel }}" + # ZIP_NAME="${{ steps.zip.outputs.zip_name }}" + # CHANGELOG="${{ steps.changelog.outputs.log }}" + + # DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" + + # jq -n \ + # --arg plugin "$PLUGIN_NAME" \ + # --arg version "$VERSION" \ + # --arg channel "$CHANNEL" \ + # --arg description "$DESCRIPTION" \ + # --arg author "$AUTHOR" \ + # --arg email "$EMAIL" \ + # --arg url "$DOWNLOAD_URL" \ + # --arg changelog "$CHANGELOG" \ + # '{ + # plugin: $plugin, + # version: $version, + # channel: $channel, + # description: $description, + # author: $author, + # email: $email, + # url: $url, + # changelog: $changelog + # }' > payload.json + + # echo "Payload:" + # cat payload.json + - name: Payload erzeugen run: | cd repo - PLUGIN_NAME=$(grep '^name=' metadata.txt | cut -d '=' -f2) - DESCRIPTION=$(grep '^description=' metadata.txt | cut -d '=' -f2) - AUTHOR=$(grep '^author=' metadata.txt | cut -d '=' -f2) - EMAIL=$(grep '^email=' metadata.txt | cut -d '=' -f2) - VERSION="${{ steps.releaseinfo.outputs.version }}" CHANNEL="${{ steps.releaseinfo.outputs.channel }}" ZIP_NAME="${{ steps.zip.outputs.zip_name }}" - CHANGELOG="${{ steps.changelog.outputs.log }}" DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" jq -n \ - --arg plugin "$PLUGIN_NAME" \ + --arg plugin "${{ steps.info.outputs.name }}" \ --arg version "$VERSION" \ --arg channel "$CHANNEL" \ - --arg description "$DESCRIPTION" \ - --arg author "$AUTHOR" \ - --arg email "$EMAIL" \ + --arg description "${{ steps.info.outputs.description }}" \ + --arg author "${{ steps.info.outputs.author }}" \ + --arg email "${{ steps.info.outputs.email }}" \ --arg url "$DOWNLOAD_URL" \ - --arg changelog "$CHANGELOG" \ + --arg changelog "Automatischer Release" \ '{ plugin: $plugin, version: $version, @@ -213,21 +307,39 @@ jobs: changelog: $changelog }' > payload.json - echo "Payload:" + echo "DEBUG | Payload erzeugt:" cat payload.json + # - name: Repository aktualisieren + # run: | + # OWNER="AG_QGIS" + # WORKFLOW="update.yml" + + # # payload.json in Base64 umwandeln + # PAYLOAD_B64=$(base64 -w0 repo/payload.json) + + # # JSON für Gitea bauen + # JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" + + # echo "Sende JSON:" + # echo "$JSON" + + # curl -X POST \ + # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ + # -H "Content-Type: application/json" \ + # -d "$JSON" \ + # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + - name: Repository aktualisieren run: | OWNER="AG_QGIS" WORKFLOW="update.yml" - # payload.json in Base64 umwandeln PAYLOAD_B64=$(base64 -w0 repo/payload.json) - # JSON für Gitea bauen JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" - echo "Sende JSON:" + echo "DEBUG | Sende JSON:" echo "$JSON" curl -X POST \ @@ -235,4 +347,3 @@ jobs: -H "Content-Type: application/json" \ -d "$JSON" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" - diff --git a/.gitignore b/.gitignore index 1e87eb9..bab976c 100644 --- a/.gitignore +++ b/.gitignore @@ -174,4 +174,5 @@ cython_debug/ # PyPI configuration file .pypirc -metadata.txt \ No newline at end of file +metadata.txt +release.cmd \ No newline at end of file diff --git a/.plugin/zip_folder b/.plugin/zip_folder deleted file mode 100644 index 4572dbb..0000000 --- a/.plugin/zip_folder +++ /dev/null @@ -1 +0,0 @@ -sn_test \ No newline at end of file diff --git a/.plugin/plugin.cfg b/plugin.info similarity index 66% rename from .plugin/plugin.cfg rename to plugin.info index 6bd305f..207e5a2 100644 --- a/.plugin/plugin.cfg +++ b/plugin.info @@ -1,14 +1,13 @@ -[general] -zip_folder=mein_plugin_ordner name=LNO Sachsen | Plugin Test Action -qgisMinimumVersion=3.0 -qgisMaximumVersion=3.99 description=Test plugin for release pipeline -version=26.3.1 -author=Michael Otto -email=michael.otto@landkreis-mittelsachsen.de +version=@VERSION@ +author=Daniel Helbig, Michael Otto +email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de homepage=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action tracker=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/issues repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action -experimental=False -deprecated=False \ No newline at end of file +qgisMinimumVersion=3.0 +qgisMaximumVersion=3.99 +deprecated=False +experimental=True +zip_folder=plugin_folder diff --git a/.plugin/metadata.template b/templates/metadata.template similarity index 85% rename from .plugin/metadata.template rename to templates/metadata.template index ea4a937..8a2c85e 100644 --- a/.plugin/metadata.template +++ b/templates/metadata.template @@ -1,8 +1,8 @@ [general] -name=LNO Sachsen | Plugin Test Action +name={{PLUGIN}} qgisMinimumVersion=3.0 qgisMaximumVersion=3.99 -description=Test plugin for release pipeline +description={{DESCRIPTION}} version=@VERSION@ author=Daniel Helbig, Michael Otto email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de From 495a4ac0499e884a86210352263b09a557ee02cb Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 11:16:03 +0100 Subject: [PATCH 69/84] Pfad der metadate.template angepasst --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f5c9ce8..bed462f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -85,7 +85,7 @@ jobs: run: | cd repo - TEMPLATE=".plugin/metadata.template" + TEMPLATE="templates/metadata.template" OUT="metadata.txt" CONTENT=$(cat "$TEMPLATE") From 5d12fefb1d6cf19a85da212fd0e72f733226a7bc Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 11:28:58 +0100 Subject: [PATCH 70/84] Test komplette metadata.txt --- .gitea/workflows/release.yml | 10 +++++++++- templates/metadata.template | 23 ++++++++++++----------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index bed462f..9f33aec 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -91,10 +91,18 @@ jobs: CONTENT=$(cat "$TEMPLATE") CONTENT="${CONTENT//\{\{NAME\}\}/${{ steps.info.outputs.name }}}" + CONTENT="${CONTENT//\{\{QGIS_MIN\}\}/${{ steps.info.outputs.qgisMinimumVersion }}}" + CONTENT="${CONTENT//\{\{QGIS_MAX\}\}/${{ steps.info.outputs.qgisMaximumVersion }}}" CONTENT="${CONTENT//\{\{DESCRIPTION\}\}/${{ steps.info.outputs.description }}}" + CONTENT="${CONTENT//\{\{VERSION\}\}/${{ steps.releaseinfo.outputs.version }}}" CONTENT="${CONTENT//\{\{AUTHOR\}\}/${{ steps.info.outputs.author }}}" CONTENT="${CONTENT//\{\{EMAIL\}\}/${{ steps.info.outputs.email }}}" - CONTENT="${CONTENT//\{\{VERSION\}\}/${{ steps.releaseinfo.outputs.version }}}" + CONTENT="${CONTENT//\{\{HOMEPAGE\}\}/${{ steps.info.outputs.homepage }}}" + CONTENT="${CONTENT//\{\{TRACKER\}\}/${{ steps.info.outputs.tracker }}}" + CONTENT="${CONTENT//\{\{REPOSITORY\}\}/${{ steps.info.outputs.repository }}}" + CONTENT="${CONTENT//\{\{EXPERIMENTAL\}\}/${{ steps.info.outputs.experimental }}}" + CONTENT="${CONTENT//\{\{DEPRECATED\}\}/${{ steps.info.outputs.deprecated }}}" + CONTENT="${CONTENT//\{\{QT6\}\}/${{ steps.info.outputs.supportsQt6 }}}" printf "%s\n" "$CONTENT" > "$OUT" diff --git a/templates/metadata.template b/templates/metadata.template index 8a2c85e..5080ef5 100644 --- a/templates/metadata.template +++ b/templates/metadata.template @@ -1,13 +1,14 @@ [general] -name={{PLUGIN}} -qgisMinimumVersion=3.0 -qgisMaximumVersion=3.99 +name={{NAME}} +qgisMinimumVersion={{QGIS_MIN}} +qgisMaximumVersion={{QGIS_MAX}} description={{DESCRIPTION}} -version=@VERSION@ -author=Daniel Helbig, Michael Otto -email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de -homepage=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action -tracker=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/issues -repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action -experimental=True -deprecated=False \ No newline at end of file +version={{VERSION}} +author={{AUTHOR}} +email={{EMAIL}} +homepage={{HOMEPAGE}} +tracker={{TRACKER}} +repository={{REPOSITORY}} +experimental={{EXPERIMENTAL}} +deprecated={{DEPRECATED}} +supportsQt6={{QT6}} \ No newline at end of file From 2eacee23f56e61771235a9663e94350f4617b7d4 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 12:09:26 +0100 Subject: [PATCH 71/84] =?UTF-8?q?Payload=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 49 ++++++++++++++++++++++++------------ plugin.info | 2 ++ 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 9f33aec..e482a43 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -296,28 +296,45 @@ jobs: DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" jq -n \ - --arg plugin "${{ steps.info.outputs.name }}" \ - --arg version "$VERSION" \ - --arg channel "$CHANNEL" \ - --arg description "${{ steps.info.outputs.description }}" \ - --arg author "${{ steps.info.outputs.author }}" \ - --arg email "${{ steps.info.outputs.email }}" \ - --arg url "$DOWNLOAD_URL" \ - --arg changelog "Automatischer Release" \ + --arg plugin "${{ steps.info.outputs.name }}" \ + --arg version "$VERSION" \ + --arg channel "$CHANNEL" \ + --arg description "${{ steps.info.outputs.description }}" \ + --arg author "${{ steps.info.outputs.author }}" \ + --arg email "${{ steps.info.outputs.email }}" \ + --arg qgis_min "${{ steps.info.outputs.qgisMinimumVersion }}" \ + --arg qgis_max "${{ steps.info.outputs.qgisMaximumVersion }}" \ + --arg homepage "${{ steps.info.outputs.homepage }}" \ + --arg tracker "${{ steps.info.outputs.tracker }}" \ + --arg repository "${{ steps.info.outputs.repository }}" \ + --arg experimental "${{ steps.info.outputs.experimental }}" \ + --arg deprecated "${{ steps.info.outputs.deprecated }}" \ + --arg qt6 "${{ steps.info.outputs.supportsQt6 }}" \ + --arg url "$DOWNLOAD_URL" \ + --arg changelog "Automatischer Release" \ '{ - plugin: $plugin, - version: $version, - channel: $channel, - description: $description, - author: $author, - email: $email, - url: $url, - changelog: $changelog + plugin: $plugin, + version: $version, + channel: $channel, + description: $description, + author: $author, + email: $email, + qgis_min: $qgis_min, + qgis_max: $qgis_max, + homepage: $homepage, + tracker: $tracker, + repository: $repository, + experimental: $experimental, + deprecated: $deprecated, + qt6: $qt6, + url: $url, + changelog: $changelog }' > payload.json echo "DEBUG | Payload erzeugt:" cat payload.json + # - name: Repository aktualisieren # run: | # OWNER="AG_QGIS" diff --git a/plugin.info b/plugin.info index 207e5a2..36b9751 100644 --- a/plugin.info +++ b/plugin.info @@ -10,4 +10,6 @@ qgisMinimumVersion=3.0 qgisMaximumVersion=3.99 deprecated=False experimental=True +supportsQt6=Yes + zip_folder=plugin_folder From 4790001f30d11685e7f0506e4dca566203a77e79 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 12:18:43 +0100 Subject: [PATCH 72/84] Name und ID angepasst --- .gitea/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e482a43..15d5518 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -296,7 +296,7 @@ jobs: DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" jq -n \ - --arg plugin "${{ steps.info.outputs.name }}" \ + --arg name "${{ steps.info.outputs.name }}" \ --arg version "$VERSION" \ --arg channel "$CHANNEL" \ --arg description "${{ steps.info.outputs.description }}" \ @@ -310,10 +310,11 @@ jobs: --arg experimental "${{ steps.info.outputs.experimental }}" \ --arg deprecated "${{ steps.info.outputs.deprecated }}" \ --arg qt6 "${{ steps.info.outputs.supportsQt6 }}" \ + --arg id "${{ steps.info.outputs.zip_folder }}" \ --arg url "$DOWNLOAD_URL" \ --arg changelog "Automatischer Release" \ '{ - plugin: $plugin, + name: $name, version: $version, channel: $channel, description: $description, @@ -327,6 +328,7 @@ jobs: experimental: $experimental, deprecated: $deprecated, qt6: $qt6, + id: $id, url: $url, changelog: $changelog }' > payload.json From 0fa2861040c6bc483eeecac0020455a9f6c69c67 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 12:50:29 +0100 Subject: [PATCH 73/84] Optimierungen --- .gitea/workflows/release.yml | 6 +++--- plugin.info | 4 ---- templates/metadata.template | 6 +++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 15d5518..825a7fa 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -97,9 +97,9 @@ jobs: CONTENT="${CONTENT//\{\{VERSION\}\}/${{ steps.releaseinfo.outputs.version }}}" CONTENT="${CONTENT//\{\{AUTHOR\}\}/${{ steps.info.outputs.author }}}" CONTENT="${CONTENT//\{\{EMAIL\}\}/${{ steps.info.outputs.email }}}" - CONTENT="${CONTENT//\{\{HOMEPAGE\}\}/${{ steps.info.outputs.homepage }}}" - CONTENT="${CONTENT//\{\{TRACKER\}\}/${{ steps.info.outputs.tracker }}}" - CONTENT="${CONTENT//\{\{REPOSITORY\}\}/${{ steps.info.outputs.repository }}}" + CONTENT="${CONTENT//\{\{HOMEPAGE\}\}/${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}}" + CONTENT="${CONTENT//\{\{TRACKER\}\}/${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}}" + CONTENT="${CONTENT//\{\{REPOSITORY\}\}/${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}}" CONTENT="${CONTENT//\{\{EXPERIMENTAL\}\}/${{ steps.info.outputs.experimental }}}" CONTENT="${CONTENT//\{\{DEPRECATED\}\}/${{ steps.info.outputs.deprecated }}}" CONTENT="${CONTENT//\{\{QT6\}\}/${{ steps.info.outputs.supportsQt6 }}}" diff --git a/plugin.info b/plugin.info index 36b9751..ae13d8a 100644 --- a/plugin.info +++ b/plugin.info @@ -1,11 +1,7 @@ name=LNO Sachsen | Plugin Test Action description=Test plugin for release pipeline -version=@VERSION@ author=Daniel Helbig, Michael Otto email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de -homepage=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action -tracker=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/issues -repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action qgisMinimumVersion=3.0 qgisMaximumVersion=3.99 deprecated=False diff --git a/templates/metadata.template b/templates/metadata.template index 5080ef5..9b67d67 100644 --- a/templates/metadata.template +++ b/templates/metadata.template @@ -6,9 +6,9 @@ description={{DESCRIPTION}} version={{VERSION}} author={{AUTHOR}} email={{EMAIL}} -homepage={{HOMEPAGE}} -tracker={{TRACKER}} -repository={{REPOSITORY}} +homepage=https://{{HOMEPAGE}} +tracker=https://{{TRACKER}}/issues +repository=https://{{REPOSITORY}} experimental={{EXPERIMENTAL}} deprecated={{DEPRECATED}} supportsQt6={{QT6}} \ No newline at end of file From dac2a8e97337b0a67f1c5b9b13db7d737e7f5a73 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 12:55:38 +0100 Subject: [PATCH 74/84] Release v57 --- .gitea/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 825a7fa..feed553 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -304,9 +304,9 @@ jobs: --arg email "${{ steps.info.outputs.email }}" \ --arg qgis_min "${{ steps.info.outputs.qgisMinimumVersion }}" \ --arg qgis_max "${{ steps.info.outputs.qgisMaximumVersion }}" \ - --arg homepage "${{ steps.info.outputs.homepage }}" \ - --arg tracker "${{ steps.info.outputs.tracker }}" \ - --arg repository "${{ steps.info.outputs.repository }}" \ + --arg homepage "${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ + --arg tracker "$${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ + --arg repository "$${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ --arg experimental "${{ steps.info.outputs.experimental }}" \ --arg deprecated "${{ steps.info.outputs.deprecated }}" \ --arg qt6 "${{ steps.info.outputs.supportsQt6 }}" \ From a6837e5fd259e5ae8af0a9a4f0d0762b0bd5bbca Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 13:44:48 +0100 Subject: [PATCH 75/84] changelog in release.yml aufgenommen --- .gitea/workflows/release.yml | 256 +++++++------------------ .plugin/changelog.txt => changelog.txt | 1 - plugin.info | 2 +- 3 files changed, 68 insertions(+), 191 deletions(-) rename .plugin/changelog.txt => changelog.txt (92%) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index feed553..3ac07a0 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -23,11 +23,9 @@ jobs: run: | # Tag aus GitHub Actions Kontext extrahieren TAG="${GITHUB_REF#refs/tags/}" - echo "DEBUG | Tag erkannt: $TAG" # Repo-URL dynamisch aus vars und github.repository bauen REPO_URL="https://${RELEASE_TOKEN}:x-oauth-basic@${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}.git" - echo "DEBUG | Klone von: $REPO_URL" # Repository klonen git clone "$REPO_URL" repo @@ -52,24 +50,6 @@ jobs: echo "version=${VERSION}" >> $GITHUB_OUTPUT echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT - echo "DEBUG | Version: $VERSION" - echo "DEBUG | Kanal: $CHANNEL" - - # - name: metadata.txt erzeugen - # run: | - # cd repo - - # VERSION="${{ steps.releaseinfo.outputs.version }}" - - # # Vorlage kopieren - # cp .plugin/metadata.template metadata.txt - - # # Platzhalter ersetzen - # sed -i "s/@VERSION@/${VERSION}/g" metadata.txt - - # echo "DEBUG | metadata.txt erzeugt:" - # cat metadata.txt - - name: plugin.info einlesen id: info run: | @@ -78,8 +58,30 @@ jobs: echo "$key=$value" >> $GITHUB_OUTPUT done < plugin.info - echo "DEBUG | plugin.info geladen:" - cat plugin.info + - name: Changelog einlesen + id: changelog + run: | + cd repo + + # Aktueller Block = alles vor dem ersten --- + CURRENT=$(sed '/^---/Q' changelog.txt) + + # Vollständige Historie für Gitea Release Body + # Aktuelle Version aus Tag voranstellen + VERSION="${{ steps.releaseinfo.outputs.version }}" + FULL=$(printf "## %s\n%s\n\n%s" \ + "$VERSION" \ + "$CURRENT" \ + "$(sed '1,/^---/d' changelog.txt)") + + # Für GITHUB_OUTPUT: Newlines escapen + echo "current<> $GITHUB_OUTPUT + echo "$CURRENT" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + echo "full<> $GITHUB_OUTPUT + echo "$FULL" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: metadata.txt erzeugen run: | @@ -106,60 +108,17 @@ jobs: printf "%s\n" "$CONTENT" > "$OUT" - echo "DEBUG | metadata.txt erzeugt:" - cat metadata.txt - - # - name: ZIP-Datei erstellen - # id: zip - # run: | - # cd repo - - # # Plugin-Ordnername aus .plugin/zip_folder lesen - # ZIP_FOLDER=$(cat .plugin/zip_folder) - # echo "DEBUG | Plugin-Ordnername: $ZIP_FOLDER" - - # VERSION="${{ steps.releaseinfo.outputs.version }}" - # REPO_NAME="${GITHUB_REPOSITORY##*/}" - # ZIP_NAME="${REPO_NAME}-${VERSION}.zip" - - # echo "DEBUG | ZIP wird erzeugt: $ZIP_NAME" - - # # Temporären Build-Ordner anlegen - # mkdir -p dist/${ZIP_FOLDER} - - # # Plugin-Dateien kopieren (alles außer CI-/Meta-Verzeichnisse) - # rsync -a \ - # --exclude='.git' \ - # --exclude='.gitea' \ - # --exclude='.plugin' \ - # --exclude='dist' \ - # ./ dist/${ZIP_FOLDER}/ - - # # ZIP erzeugen - # cd dist - # zip -r "${ZIP_NAME}" "${ZIP_FOLDER}/" \ - # -x "*.pyc" -x "*/__pycache__/*" - # cd .. - - # # ZIP-Name für spätere Steps bereitstellen - # echo "zip_name=${ZIP_NAME}" >> $GITHUB_OUTPUT - - # echo "DEBUG | ZIP-Datei erzeugt: dist/${ZIP_NAME}" - - name: ZIP-Datei erstellen id: zip run: | cd repo ZIP_FOLDER="${{ steps.info.outputs.zip_folder }}" - echo "DEBUG | Plugin-Ordnername: $ZIP_FOLDER" VERSION="${{ steps.releaseinfo.outputs.version }}" REPO_NAME="${GITHUB_REPOSITORY##*/}" ZIP_NAME="${REPO_NAME}-${VERSION}.zip" - echo "DEBUG | ZIP wird erzeugt: $ZIP_NAME" - mkdir -p dist/${ZIP_FOLDER} rsync -a \ @@ -183,24 +142,14 @@ jobs: VERSION="${{ steps.releaseinfo.outputs.version }}" CHANNEL="${{ steps.releaseinfo.outputs.channel }}" - echo "Erstelle Release für Tag: $TAG" - echo "Version: $VERSION" - echo "Kanal: $CHANNEL" - API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases" - # JSON‑Body erzeugen JSON=$(jq -n \ - --arg tag "$TAG" \ - --arg name "Version $VERSION" \ - --arg body "Automatisch erzeugtes Release für Kanal: $CHANNEL" \ + --arg tag "$TAG" \ + --arg name "Version $VERSION" \ + --arg body "${{ steps.changelog.outputs.full }}" \ '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}') - echo "Sende API‑Request an: $API_URL" - echo "JSON‑Payload:" - echo "$JSON" - - # Release erstellen API_RESPONSE=$(curl -s -X POST "$API_URL" \ -H "accept: application/json" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ @@ -209,24 +158,19 @@ jobs: RELEASE_ID=$(echo "$API_RESPONSE" | jq -r '.id') - if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then - echo "Fehler beim Erstellen des Releases!" - echo "API‑Antwort:" - echo "$API_RESPONSE" - exit 1 - fi + if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then + echo "Fehler beim Erstellen des Releases!" + echo "$API_RESPONSE" + exit 1 + fi - echo "Release erfolgreich erstellt. ID: $RELEASE_ID" - echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT + echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT - name: ZIP-Datei hochladen run: | RELEASE_ID="${{ steps.create_release.outputs.release_id }}" ZIP_NAME="${{ steps.zip.outputs.zip_name }}" - echo "Lade ZIP-Datei hoch: $ZIP_NAME" - echo "Release-ID: $RELEASE_ID" - API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${ZIP_NAME}" curl -s -X POST "$API_URL" \ @@ -235,9 +179,6 @@ jobs: --data-binary "@repo/dist/${ZIP_NAME}" \ -o upload_response.json - echo "Upload-Antwort:" - cat upload_response.json - # Optional: Fehlerprüfung if jq -e '.id' upload_response.json >/dev/null 2>&1; then echo "ZIP erfolgreich hochgeladen." @@ -246,45 +187,6 @@ jobs: exit 1 fi - # - name: Payload erzeugen - # run: | - # cd repo - - # PLUGIN_NAME=$(grep '^name=' metadata.txt | cut -d '=' -f2) - # DESCRIPTION=$(grep '^description=' metadata.txt | cut -d '=' -f2) - # AUTHOR=$(grep '^author=' metadata.txt | cut -d '=' -f2) - # EMAIL=$(grep '^email=' metadata.txt | cut -d '=' -f2) - - # VERSION="${{ steps.releaseinfo.outputs.version }}" - # CHANNEL="${{ steps.releaseinfo.outputs.channel }}" - # ZIP_NAME="${{ steps.zip.outputs.zip_name }}" - # CHANGELOG="${{ steps.changelog.outputs.log }}" - - # DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" - - # jq -n \ - # --arg plugin "$PLUGIN_NAME" \ - # --arg version "$VERSION" \ - # --arg channel "$CHANNEL" \ - # --arg description "$DESCRIPTION" \ - # --arg author "$AUTHOR" \ - # --arg email "$EMAIL" \ - # --arg url "$DOWNLOAD_URL" \ - # --arg changelog "$CHANGELOG" \ - # '{ - # plugin: $plugin, - # version: $version, - # channel: $channel, - # description: $description, - # author: $author, - # email: $email, - # url: $url, - # changelog: $changelog - # }' > payload.json - - # echo "Payload:" - # cat payload.json - - name: Payload erzeugen run: | cd repo @@ -296,67 +198,43 @@ jobs: DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}" jq -n \ - --arg name "${{ steps.info.outputs.name }}" \ - --arg version "$VERSION" \ - --arg channel "$CHANNEL" \ - --arg description "${{ steps.info.outputs.description }}" \ - --arg author "${{ steps.info.outputs.author }}" \ - --arg email "${{ steps.info.outputs.email }}" \ - --arg qgis_min "${{ steps.info.outputs.qgisMinimumVersion }}" \ - --arg qgis_max "${{ steps.info.outputs.qgisMaximumVersion }}" \ - --arg homepage "${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ - --arg tracker "$${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ - --arg repository "$${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ - --arg experimental "${{ steps.info.outputs.experimental }}" \ - --arg deprecated "${{ steps.info.outputs.deprecated }}" \ - --arg qt6 "${{ steps.info.outputs.supportsQt6 }}" \ - --arg id "${{ steps.info.outputs.zip_folder }}" \ - --arg url "$DOWNLOAD_URL" \ - --arg changelog "Automatischer Release" \ + --arg name "${{ steps.info.outputs.name }}" \ + --arg version "$VERSION" \ + --arg channel "$CHANNEL" \ + --arg description "${{ steps.info.outputs.description }}" \ + --arg author "${{ steps.info.outputs.author }}" \ + --arg email "${{ steps.info.outputs.email }}" \ + --arg qgis_min "${{ steps.info.outputs.qgisMinimumVersion }}" \ + --arg qgis_max "${{ steps.info.outputs.qgisMaximumVersion }}" \ + --arg homepage "${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ + --arg tracker "${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ + --arg repository "${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}" \ + --arg experimental "${{ steps.info.outputs.experimental }}" \ + --arg deprecated "${{ steps.info.outputs.deprecated }}" \ + --arg qt6 "${{ steps.info.outputs.supportsQt6 }}" \ + --arg id "${{ steps.info.outputs.zip_folder }}" \ + --arg url "$DOWNLOAD_URL" \ + --arg changelog "${{ steps.changelog.outputs.current }}" \ '{ - name: $name, - version: $version, - channel: $channel, - description: $description, - author: $author, - email: $email, - qgis_min: $qgis_min, - qgis_max: $qgis_max, - homepage: $homepage, - tracker: $tracker, - repository: $repository, - experimental: $experimental, - deprecated: $deprecated, - qt6: $qt6, - id: $id, - url: $url, - changelog: $changelog + name: $name, + version: $version, + channel: $channel, + description: $description, + author: $author, + email: $email, + qgis_min: $qgis_min, + qgis_max: $qgis_max, + homepage: $homepage, + tracker: $tracker, + repository: $repository, + experimental: $experimental, + deprecated: $deprecated, + qt6: $qt6, + id: $id, + url: $url, + changelog: $changelog }' > payload.json - echo "DEBUG | Payload erzeugt:" - cat payload.json - - - # - name: Repository aktualisieren - # run: | - # OWNER="AG_QGIS" - # WORKFLOW="update.yml" - - # # payload.json in Base64 umwandeln - # PAYLOAD_B64=$(base64 -w0 repo/payload.json) - - # # JSON für Gitea bauen - # JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}" - - # echo "Sende JSON:" - # echo "$JSON" - - # curl -X POST \ - # -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ - # -H "Content-Type: application/json" \ - # -d "$JSON" \ - # "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" - - name: Repository aktualisieren run: | OWNER="AG_QGIS" diff --git a/.plugin/changelog.txt b/changelog.txt similarity index 92% rename from .plugin/changelog.txt rename to changelog.txt index efe02ee..bc67dd4 100644 --- a/.plugin/changelog.txt +++ b/changelog.txt @@ -1,4 +1,3 @@ -0.2.0 - Feature XY hinzugefügt - Bug Z behoben 0.1.0 diff --git a/plugin.info b/plugin.info index ae13d8a..c69ce7f 100644 --- a/plugin.info +++ b/plugin.info @@ -5,7 +5,7 @@ email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de qgisMinimumVersion=3.0 qgisMaximumVersion=3.99 deprecated=False -experimental=True +experimental=True supportsQt6=Yes zip_folder=plugin_folder From 5f756be0771815478a03af1e0e2491da02e5ae82 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 13:50:17 +0100 Subject: [PATCH 76/84] Fehler in release.yml beseitigt --- .gitea/workflows/release.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 3ac07a0..b5e8fb1 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -60,28 +60,28 @@ jobs: - name: Changelog einlesen id: changelog - run: | - cd repo + run: | + cd repo - # Aktueller Block = alles vor dem ersten --- - CURRENT=$(sed '/^---/Q' changelog.txt) + # Aktueller Block = alles vor dem ersten --- + CURRENT=$(sed '/^---/Q' changelog.txt) - # Vollständige Historie für Gitea Release Body - # Aktuelle Version aus Tag voranstellen - VERSION="${{ steps.releaseinfo.outputs.version }}" - FULL=$(printf "## %s\n%s\n\n%s" \ - "$VERSION" \ - "$CURRENT" \ - "$(sed '1,/^---/d' changelog.txt)") + # Vollständige Historie für Gitea Release Body + # Aktuelle Version aus Tag voranstellen + VERSION="${{ steps.releaseinfo.outputs.version }}" + FULL=$(printf "## %s\n%s\n\n%s" \ + "$VERSION" \ + "$CURRENT" \ + "$(sed '1,/^---/d' changelog.txt)") - # Für GITHUB_OUTPUT: Newlines escapen - echo "current<> $GITHUB_OUTPUT - echo "$CURRENT" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + # Für GITHUB_OUTPUT: Newlines escapen + echo "current<> $GITHUB_OUTPUT + echo "$CURRENT" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - echo "full<> $GITHUB_OUTPUT - echo "$FULL" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + echo "full<> $GITHUB_OUTPUT + echo "$FULL" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: metadata.txt erzeugen run: | From 8f0e6a9978459f4181ed2a9341cb9427669ebf63 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 13:57:02 +0100 Subject: [PATCH 77/84] Release v60 --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index b5e8fb1..f63f9d8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -135,7 +135,7 @@ jobs: echo "zip_name=${ZIP_NAME}" >> $GITHUB_OUTPUT - - name: Gitea‑Release erstellen + - name: Gitea-Release erstellen id: create_release run: | TAG="${{ github.ref_name }}" From 00785eeabdea29ef2c7eec930b899fadaf496a62 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 13:58:12 +0100 Subject: [PATCH 78/84] Release v61 --- .gitea/workflows/release.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f63f9d8..82e18a1 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -64,17 +64,19 @@ jobs: cd repo # Aktueller Block = alles vor dem ersten --- - CURRENT=$(sed '/^---/Q' changelog.txt) + CURRENT=$(awk '/^---/{exit} {print}' changelog.txt) - # Vollständige Historie für Gitea Release Body - # Aktuelle Version aus Tag voranstellen + # Vollständige Historie = alles nach dem ersten --- + HISTORY=$(awk 'found{print} /^---/{found=1}' changelog.txt) + + # Gitea Release Body zusammenbauen VERSION="${{ steps.releaseinfo.outputs.version }}" - FULL=$(printf "## %s\n%s\n\n%s" \ - "$VERSION" \ - "$CURRENT" \ - "$(sed '1,/^---/d' changelog.txt)") + FULL=$(printf "## %s\n%s\n\n%s" "$VERSION" "$CURRENT" "$HISTORY") - # Für GITHUB_OUTPUT: Newlines escapen + echo "DEBUG | Aktueller Changelog:" + echo "$CURRENT" + + # Für GITHUB_OUTPUT: Multiline via EOF-Marker echo "current<> $GITHUB_OUTPUT echo "$CURRENT" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT From 78ffc6d6d23949c3e9090b41043f93d4b0fe9ce1 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:02:32 +0100 Subject: [PATCH 79/84] Diverses --- changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.txt b/changelog.txt index bc67dd4..8ed9a99 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ + - Ganz viele neue Sachen +--- +61 - Feature XY hinzugefügt - Bug Z behoben 0.1.0 From a58f6255fc48919430c9fb30c7cb2af5e2cf3fc0 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:09:39 +0100 Subject: [PATCH 80/84] =?UTF-8?q?Anpassungen=20f=C3=BCr=20Releasemeldung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 2 +- templates/metadata.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 82e18a1..628d971 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -149,7 +149,7 @@ jobs: JSON=$(jq -n \ --arg tag "$TAG" \ --arg name "Version $VERSION" \ - --arg body "${{ steps.changelog.outputs.full }}" \ + --arg body "${{ steps.changelog.outputs.current }}" \ '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}') API_RESPONSE=$(curl -s -X POST "$API_URL" \ diff --git a/templates/metadata.template b/templates/metadata.template index 9b67d67..03702bf 100644 --- a/templates/metadata.template +++ b/templates/metadata.template @@ -11,4 +11,4 @@ tracker=https://{{TRACKER}}/issues repository=https://{{REPOSITORY}} experimental={{EXPERIMENTAL}} deprecated={{DEPRECATED}} -supportsQt6={{QT6}} \ No newline at end of file +supportsQt6={{QT6}} From 98fb235fb93dfe09ba37432616f4ccd2e3c4d2f5 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:11:54 +0100 Subject: [PATCH 81/84] Release v65 --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 628d971..de5e37c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -150,7 +150,7 @@ jobs: --arg tag "$TAG" \ --arg name "Version $VERSION" \ --arg body "${{ steps.changelog.outputs.current }}" \ - '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}') + '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: true}') API_RESPONSE=$(curl -s -X POST "$API_URL" \ -H "accept: application/json" \ From 8ee99fa5da644fcb8b738fb128f371619120c4f2 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:12:40 +0100 Subject: [PATCH 82/84] Release v66 --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index de5e37c..a9ad773 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -150,7 +150,7 @@ jobs: --arg tag "$TAG" \ --arg name "Version $VERSION" \ --arg body "${{ steps.changelog.outputs.current }}" \ - '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: true}') + '{tag_name: $tag, name: $name, body: $body, draft: true, prerelease: true}') API_RESPONSE=$(curl -s -X POST "$API_URL" \ -H "accept: application/json" \ From 3ee93bdc0d0890d1a9846a47f35ec35dcad7320e Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:22:12 +0100 Subject: [PATCH 83/84] Kennzeichnung stable/unstable/testing --- .gitea/workflows/release.yml | 42 +++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a9ad773..5add33b 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,15 +40,29 @@ jobs: run: | TAG="${{ github.ref_name }}" VERSION="${TAG#v}" - + case "$TAG" in - *-unstable*) CHANNEL="unstable" ;; - *-testing*) CHANNEL="testing" ;; - *) CHANNEL="stable" ;; + *-unstable*) + CHANNEL="unstable" + DRAFT="false" + PRERELEASE="true" + ;; + *-testing*) + CHANNEL="testing" + DRAFT="true" + PRERELEASE="false" + ;; + *) + CHANNEL="stable" + DRAFT="false" + PRERELEASE="false" + ;; esac - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "channel=${CHANNEL}" >> $GITHUB_OUTPUT + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "channel=$CHANNEL" >> $GITHUB_OUTPUT + echo "draft=$DRAFT" >> $GITHUB_OUTPUT + echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT - name: plugin.info einlesen id: info @@ -147,10 +161,18 @@ jobs: API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${GITHUB_REPOSITORY}/releases" JSON=$(jq -n \ - --arg tag "$TAG" \ - --arg name "Version $VERSION" \ - --arg body "${{ steps.changelog.outputs.current }}" \ - '{tag_name: $tag, name: $name, body: $body, draft: true, prerelease: true}') + --arg tag "$TAG" \ + --arg name "Version $VERSION" \ + --arg body "Automatisch erzeugtes Release für Kanal: $CHANNEL" \ + --argjson draft "${{ steps.releaseinfo.outputs.draft }}" \ + --argjson prerelease "${{ steps.releaseinfo.outputs.prerelease }}" \ + '{tag_name: $tag, name: $name, body: $body, draft: $draft, prerelease: $prerelease}') + + # JSON=$(jq -n \ + # --arg tag "$TAG" \ + # --arg name "Version $VERSION" \ + # --arg body "${{ steps.changelog.outputs.current }}" \ + # '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}') API_RESPONSE=$(curl -s -X POST "$API_URL" \ -H "accept: application/json" \ From aecf203932880b12ee24a450b83af1752d827d7d Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 14:47:45 +0100 Subject: [PATCH 84/84] Letzte Fehler behoben --- .gitea/workflows/release.yml | 2 +- plugin.info | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5add33b..92009e4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -163,7 +163,7 @@ jobs: JSON=$(jq -n \ --arg tag "$TAG" \ --arg name "Version $VERSION" \ - --arg body "Automatisch erzeugtes Release für Kanal: $CHANNEL" \ + --arg body "${{ steps.changelog.outputs.current }}" \ --argjson draft "${{ steps.releaseinfo.outputs.draft }}" \ --argjson prerelease "${{ steps.releaseinfo.outputs.prerelease }}" \ '{tag_name: $tag, name: $name, body: $body, draft: $draft, prerelease: $prerelease}') diff --git a/plugin.info b/plugin.info index c69ce7f..0709dc9 100644 --- a/plugin.info +++ b/plugin.info @@ -1,7 +1,7 @@ name=LNO Sachsen | Plugin Test Action description=Test plugin for release pipeline -author=Daniel Helbig, Michael Otto -email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de +author=Daniel Helbig +email=daniel.helbig@kreis-meissen.de qgisMinimumVersion=3.0 qgisMaximumVersion=3.99 deprecated=False