Compare commits

...

143 Commits
v35 ... testing

Author SHA1 Message Date
60f74d17bc .gitea/workflows/release.yml gelöscht 2026-03-19 09:22:31 +01:00
8ab7bb29b2 .gitea/workflows/release_alt.txt gelöscht 2026-03-19 09:22:25 +01:00
d3e5ce6c9c Release 1-testing 2026-03-19 08:20:03 +00:00
2403a70d68 changelog.txt aktualisiert 2026-03-19 09:17:18 +01:00
Michael Otto
da4f5cdb5c initial merge 2026-03-19 08:33:08 +01:00
81034d63b8 Release 11-unstable 2026-03-19 07:20:02 +00:00
36812dca5e changelog.txt aktualisiert 2026-03-19 08:19:41 +01:00
7423abec73 metadata.txt aktualisiert 2026-03-19 08:19:15 +01:00
2d78cb6ba8 Release 10-unstable 2026-03-19 07:16:38 +00:00
9dbf68e55a changelog.txt aktualisiert 2026-03-19 08:16:19 +01:00
739d6e150c Release 9-unstable 2026-03-19 07:14:22 +00:00
184b4270bd changelog.txt aktualisiert 2026-03-19 08:13:59 +01:00
94b251b3d5 Release 8-unstable 2026-03-19 07:06:08 +00:00
c3fb8c87ab changelog.txt aktualisiert 2026-03-19 08:05:48 +01:00
5f71302df7 Release 7-unstable 2026-03-19 07:01:58 +00:00
550375fa25 changelog.txt aktualisiert 2026-03-19 08:01:40 +01:00
2643ef75bd Release 6-unstable 2026-03-19 06:58:18 +00:00
9c36e2224c changelog.txt aktualisiert 2026-03-19 07:57:56 +01:00
80e899d90f Release 5-unstable 2026-03-19 06:43:30 +00:00
f4d08185fe changelog.txt aktualisiert 2026-03-19 07:43:10 +01:00
b6f9fa33c4 Release 4-unstable 2026-03-19 06:37:43 +00:00
d377f49f7e changelog.txt aktualisiert 2026-03-19 07:37:22 +01:00
35660ebc9e Release 3-unstable 2026-03-19 06:33:10 +00:00
179657bc73 changelog.txt aktualisiert 2026-03-19 07:32:50 +01:00
1cbfe63554 Release 2-unstable 2026-03-19 06:29:24 +00:00
4928b07e51 changelog.txt aktualisiert 2026-03-19 07:29:05 +01:00
c99a3cf81c Release 1-unstable 2026-03-19 06:28:31 +00:00
da49d69d18 Release 3-unstable 2026-03-19 06:23:30 +00:00
afb05c467c changelog.txt aktualisiert 2026-03-19 07:23:12 +01:00
8ce978465d Release 2-unstable 2026-03-19 06:22:46 +00:00
ffaed7f002 Release 1-unstable 2026-03-19 06:20:17 +00:00
97e14debbe changelog.txt aktualisiert 2026-03-19 07:19:19 +01:00
4c205acd49 Release 26.3.1-unstable 2026-03-18 14:03:51 +00:00
06af34a284 Release 55-unstable 2026-03-18 13:50:22 +00:00
a0cc33d95e Release 54-unstable 2026-03-18 13:26:36 +00:00
8864789ce3 Release 53-unstable 2026-03-18 13:21:14 +00:00
a8427da05c Release 51-unstable 2026-03-18 13:06:18 +00:00
a13cf55c21 Release 50-unstable 2026-03-18 13:03:49 +00:00
916b4501f9 Release 49-unstable 2026-03-18 13:02:08 +00:00
6d74f0ebe8 Release 48-unstable 2026-03-18 12:58:00 +00:00
345c1381c8 Release 47-unstable 2026-03-18 12:56:43 +00:00
043b8565ee Release 46-unstable 2026-03-18 12:53:44 +00:00
cb57cb4762 Release 45-unstable 2026-03-18 12:52:44 +00:00
5b13d76f49 Release 44-unstable 2026-03-18 12:47:29 +00:00
344d6bd4f2 Release 43-unstable 2026-03-18 12:40:31 +00:00
d102a30382 Release 39 2026-03-18 12:28:33 +00:00
Michael Otto
27e75662dd v9 2026-03-18 13:27:45 +01:00
Michael Otto
89a000466d v8 2026-03-18 13:24:03 +01:00
b41c6cadae Release 37 2026-03-18 12:22:30 +00:00
Michael Otto
bbe566b940 v7 2026-03-18 13:22:01 +01:00
Michael Otto
443c474415 v6 2026-03-18 13:13:11 +01:00
Michael Otto
da7edb8904 v5 2026-03-18 13:12:00 +01:00
Michael Otto
7c6e102362 v4 2026-03-18 13:08:28 +01:00
Michael Otto
04fba40dee Merge branch 'unstable' of https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action into unstable 2026-03-18 13:04:51 +01:00
Michael Otto
7c8dd32cf9 v3 2026-03-18 13:04:40 +01:00
3f427ba5ae Release 31 2026-03-18 11:18:38 +00:00
Michael Otto
15288d5550 Merge branch 'unstable' of https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action into unstable 2026-03-18 12:18:06 +01:00
Michael Otto
d9ee9b5480 v2 2026-03-18 12:17:53 +01:00
008fead160 Release 30 2026-03-18 11:10:23 +00:00
Michael Otto
0f16d26ecd v1 2026-03-18 12:09:59 +01:00
Michael Otto
b917d7f51d Ermittlung der Version geändert 2026-03-18 12:05:44 +01:00
Michael Otto
3998fe7c9e Merge branch 'unstable' of https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action into unstable 2026-03-18 12:03:24 +01:00
cf51443b93 Release 27-unstable 2026-03-18 11:01:09 +00:00
Michael Otto
8c28591b56 step version geändert 2026-03-18 11:30:37 +01:00
Michael Otto
74430d3bd1 Merge branch 'unstable' of https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action into unstable 2026-03-18 11:28:22 +01:00
Michael Otto
42d6640ff8 Änderung bei der Vergabe der Tags! 2026-03-18 11:27:28 +01:00
8c8d67cc0c Release 26-unstable 2026-03-18 06:58:54 +00:00
f24bf35eba Release 25-unstable 2026-03-18 06:41:18 +00:00
5c2bb87bb5 Release 24-unstable 2026-03-18 06:39:26 +00:00
2fb265f248 Release 23-unstable 2026-03-18 06:29:22 +00:00
Michael Otto
d1ec0e9c78 Verzeichnis aufgeräumt 2026-03-18 07:28:55 +01:00
c7eaa8dd6a Release 22-unstable 2026-03-18 06:01:56 +00:00
Michael Otto
92c2e7bcb9 Zipordner jetzt über Variable 2026-03-18 06:29:34 +01:00
Michael Otto
33e5be856f Übergabe Gruppe 2026-03-17 14:37:30 +01:00
Michael Otto
e017d25870 Übergabe Name 2026-03-17 14:35:15 +01:00
Michael Otto
03b4b6ae2a Übergabe Repo-URL 2026-03-17 11:02:53 +01:00
Michael Otto
c4ba53b17f Workflow geändert, Repository übernimmt jetzt das Erstellen der ZIP und der Releases. 2026-03-17 10:31:00 +01:00
Michael Otto
7c71b0a9ac gitea actions ng12 2026-03-17 10:17:37 +01:00
Michael Otto
29759a7a4a gitea actions ng11 2026-03-17 10:16:50 +01:00
Michael Otto
a908970326 gitea actions ng10 2026-03-17 10:13:42 +01:00
Michael Otto
e760b75bf5 gitea actions ng9 2026-03-17 10:12:55 +01:00
Michael Otto
2223628050 gitea actions ng8 2026-03-17 10:12:03 +01:00
Michael Otto
bebdc996db gitea actions ng7 2026-03-17 10:04:53 +01:00
Michael Otto
be3811785b gitea actions ng6 2026-03-17 10:03:13 +01:00
Michael Otto
be1c64c1c3 gitea actions ng5 2026-03-17 10:02:26 +01:00
Michael Otto
2f2e78cc34 gitea actions ng4 2026-03-17 09:56:58 +01:00
Michael Otto
9982d125b1 gitea actions ng4 2026-03-17 09:51:17 +01:00
Michael Otto
69c086a3ae gitea actions ng3 2026-03-17 09:45:25 +01:00
Michael Otto
07f921eb03 gitea actions ng2 2026-03-17 09:43:50 +01:00
Michael Otto
a8deca3037 gitea actions ng 2026-03-17 09:31:53 +01:00
Michael Otto
ed46846d4e metadata.txt im Repo ändern 2026-03-16 14:23:20 +01:00
Michael Otto
8289269881 Auslesen der Version geändert 2026-03-16 14:18:20 +01:00
Michael Otto
c9de2e6f47 Veränderter Release Ablauf, jetzt wieder mit metadata.txt 2026-03-16 14:14:40 +01:00
Michael Otto
a881362e02 Release-Workflow hinzugefügt und plugin.info zu plugin.cfg umbenannt 2026-03-13 14:04:05 +01:00
Michael Otto
1a2afb8830 Release-Workflow hinzugefügt und plugin.info zu plugin.cfg umbenannt 2026-03-13 14:03:55 +01:00
Michael Otto
8f9e14b9a5 Release-Workflow hinzugefügt und plugin.info zu plugin.cfg umbenannt 2026-03-13 14:03:48 +01:00
Michael Otto
dd2f7287c5 Ermittlung Kanal angepasst 2026-03-13 10:39:55 +01:00
Michael Otto
524c26e64e Hinzufügen der Batch-Datei zum Erstellen von Release-Tags 2026-03-13 10:04:04 +01:00
Michael Otto
46d23087e2 Korrektur der Version- und Channel-Bestimmung für Suffixe 2026-03-13 09:59:19 +01:00
Michael Otto
541c210bf6 Release-Name mit Channel-Zusatz für pre-releases 2026-03-13 09:36:12 +01:00
Michael Otto
3d3dc098d5 Anpassung der Tag-Verarbeitung für korrekte Release-Namen 2026-03-13 09:34:39 +01:00
Michael Otto
23827bbd13 Release-Name zu VERSION ohne 'Version' Präfix geändert 2026-03-13 09:31:23 +01:00
Michael Otto
74d8eb468d Aktualisierung der release.yml für flexible Tag-Behandlung 2026-03-13 09:28:46 +01:00
Michael Otto
359b91a675 Add .gitea from unstable 2026-03-13 08:29:51 +01:00
Michael Otto
c2f0fcbbb4 Initial empty commit for testing 2026-03-13 08:29:49 +01:00
Michael Otto
8a8dfc8187 Release v26.3.3 2026-03-05 15:21:39 +01:00
Michael Otto
61e09aff21 Release v26.3.8-testing 2026-03-05 15:14:38 +01:00
Michael Otto
ed5021e268 Release v26.3.7-testing 2026-03-05 15:13:08 +01:00
Michael Otto
040af9fca3 Release v26.3.6-testing 2026-03-05 15:09:27 +01:00
Michael Otto
945c54e78f Release v26.3.5-testing 2026-03-05 15:08:27 +01:00
Michael Otto
f01e90700b Release v26.3.4-testing 2026-03-05 15:04:36 +01:00
Michael Otto
7920fb83f3 Release v26.3.2-testing 2026-03-05 14:51:38 +01:00
Michael Otto
91da5ee3c0 Release v26.3.1-testing 2026-03-05 14:44:29 +01:00
Michael Otto
0912ba17ca Release v114-testing 2026-03-05 14:29:13 +01:00
Michael Otto
afbb7e3e65 Release v113-testing 2026-03-05 14:28:08 +01:00
Michael Otto
bbbdcbcdf7 Release v104-testing 2026-03-05 12:00:15 +01:00
Michael Otto
ac1d33b125 Release v103-testing 2026-03-05 11:56:40 +01:00
Michael Otto
1a91574fe3 Release v102-testing 2026-03-05 11:54:38 +01:00
Michael Otto
eeb4dc68b2 Release v1 2026-03-05 11:49:37 +01:00
Michael Otto
e7f1e7e47c templates nach metadata.template verschoben 2026-03-05 11:25:03 +01:00
Michael Otto
0f533b32a5 Merge branch '22ottomi-main' 2026-03-04 15:59:35 +01:00
Michael Otto
aecf203932 Letzte Fehler behoben 2026-03-03 14:47:45 +01:00
Michael Otto
3ee93bdc0d Kennzeichnung stable/unstable/testing 2026-03-03 14:22:12 +01:00
Michael Otto
8ee99fa5da Release v66 2026-03-03 14:12:40 +01:00
Michael Otto
98fb235fb9 Release v65 2026-03-03 14:11:54 +01:00
Michael Otto
a58f6255fc Anpassungen für Releasemeldung 2026-03-03 14:09:39 +01:00
Michael Otto
78ffc6d6d2 Diverses 2026-03-03 14:02:32 +01:00
Michael Otto
00785eeabd Release v61 2026-03-03 13:58:12 +01:00
Michael Otto
8f0e6a9978 Release v60 2026-03-03 13:57:02 +01:00
5ef21270b2 .gitea/workflows/release.yml gelöscht 2026-03-03 13:54:01 +01:00
Michael Otto
5f756be077 Fehler in release.yml beseitigt 2026-03-03 13:50:17 +01:00
Michael Otto
a6837e5fd2 changelog in release.yml aufgenommen 2026-03-03 13:44:48 +01:00
Michael Otto
dac2a8e973 Release v57 2026-03-03 12:55:38 +01:00
Michael Otto
0fa2861040 Optimierungen 2026-03-03 12:50:29 +01:00
Michael Otto
4790001f30 Name und ID angepasst 2026-03-03 12:18:43 +01:00
Michael Otto
2eacee23f5 Payload ergänzt 2026-03-03 12:09:26 +01:00
Michael Otto
5d12fefb1d Test komplette metadata.txt 2026-03-03 11:28:58 +01:00
Michael Otto
495a4ac049 Pfad der metadate.template angepasst 2026-03-03 11:16:03 +01:00
Michael Otto
a69d00df31 auf plugin.info umgestellt 2026-03-03 11:14:22 +01:00
Michael Otto
f77a8d34a0 Release v39 2026-03-03 10:21:27 +01:00
Michael Otto
2cb504ba51 Release v38 2026-03-03 10:18:46 +01:00
Michael Otto
44aae815f5 Release v37 2026-03-03 10:15:05 +01:00
Michael Otto
af43bfeab9 Release v36 2026-03-03 10:13:36 +01:00
9 changed files with 170 additions and 470 deletions

View File

@@ -0,0 +1,133 @@
name: Release Plugin
run-name: "Release | ${{ github.ref_name }}"
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: alpine-latest
defaults:
run:
shell: bash
steps:
- name: Notwendige Abhängigkeiten installieren
shell: sh
run: |
apk add --no-cache bash git jq curl
- name: Code holen
run: |
REPO_URL="https://${RELEASE_TOKEN}:x-oauth-basic@${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}.git"
git clone "$REPO_URL" repo
cd repo
git checkout "$TAG"
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
TAG: "${{ github.ref_name }}"
- name: Version und Kanal bestimmen
id: releaseinfo
run: |
TAG="${{ github.ref_name }}"
RAW_VERSION="${TAG#v}"
VERSION="${RAW_VERSION%%-*}"
# Channel und Suffix automatisch bestimmen anhand des Tag-Suffix
case "$RAW_VERSION" in
*-testing*|*-t|*-T)
CHANNEL="testing"
PRERELEASE="true"
SUFFIX="-testing"
;;
*-unstable*|*-u|*-U)
CHANNEL="unstable"
PRERELEASE="true"
SUFFIX="-unstable"
;;
*)
CHANNEL="stable"
PRERELEASE="false"
SUFFIX=""
;;
esac
# Output setzen
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "channel=$CHANNEL" >> $GITHUB_OUTPUT
echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT
# Optional Debug
echo "VERSION=$VERSION"
echo "CHANNEL=$CHANNEL"
echo "PRERELEASE=$PRERELEASE"
# - name: plugin.cfg einlesen
# id: config
# run: |
# cd repo
# while read -r line || [ -n "$line" ]; do
# key="${line%%=*}"
# value="${line#*=}"
# echo "$key=$value" >> $GITHUB_OUTPUT
# done < plugin.cfg
- name: Payload erzeugen
id: payload
run: |
cd repo
NAME="${GITHUB_REPOSITORY##*/}"
GROUP="${GITHUB_REPOSITORY%%/*}"
VERSION="${{ steps.releaseinfo.outputs.version }}"
CHANNEL="${{ steps.releaseinfo.outputs.channel }}"
PRERELEASE="${{ steps.releaseinfo.outputs.prerelease }}"
ZIP_FOLDER="${{ vars.ZIP_FOLDER }}"
ZIP_FILE="${ZIP_FOLDER}.zip"
TAG="${{ github.ref_name }}"
#GIT_URL=${GITHUB_REPOSITORY}
jq -n \
--arg name "$NAME" \
--arg group "$GROUP" \
--arg version "$VERSION" \
--arg channel "$CHANNEL" \
--arg prerelease "$PRERELEASE" \
--arg zip_folder "$ZIP_FOLDER" \
--arg zip_file "$ZIP_FILE" \
--arg tag "$TAG" \
'{
name: $name,
group: $group,
version: $version,
channel: $channel,
prerelease: ($prerelease == "true"),
zip_folder: $zip_folder,
zip_file: $zip_file,
tag: $tag
}' > payload.json
cat payload.json
- name: Repository aktualisieren
run: |
NAME="${GITHUB_REPOSITORY##*/}"
TAG="${{ steps.releaseinfo.outputs.version }}"-"${{ steps.releaseinfo.outputs.channel }}"
PAYLOAD_B64=$(base64 -w0 repo/payload.json)
JSON="{\"ref\":\"hidden/workflows\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\",\"name\":\"$NAME\",\"tag\":\"$TAG\"}}"
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"
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
OWNER: "AG_QGIS"
WORKFLOW: "release.yaml"

View File

@@ -1,443 +0,0 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release Plugin
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: alpine-latest
defaults:
run:
shell: bash
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
- name: Code holen
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
cd repo
git checkout "$TAG"
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Version und Kanal bestimmen
id: releaseinfo
run: |
TAG="${{ github.ref_name }}"
VERSION="${TAG#v}"
case "$TAG" in
*-unstable*) CHANNEL="unstable" ;;
*-testing*) CHANNEL="testing" ;;
*) CHANNEL="stable" ;;
esac
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: 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: GiteaRelease 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"
# JSONBody 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 APIRequest an: $API_URL"
echo "JSONPayload:"
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 "APIAntwort:"
echo "$API_RESPONSE"
exit 1
fi
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: 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: Repository aktualisieren
run: |
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\",
\"inputs\": {
\"client_payload\": $PAYLOAD
}
}" \
"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 <<EOF
# <pyqgis_plugin name="${NAME}" version="${VERSION}">
# <description>${{ steps.cfg.outputs.description }}</description>
# <qgisMinimumVersion>${{ steps.cfg.outputs.qgis_min }}</qgisMinimumVersion>
# <qgisMaximumVersion>${{ steps.cfg.outputs.qgis_max }}</qgisMaximumVersion>
# <author>${{ steps.cfg.outputs.author }}</author>
# <email>${{ steps.cfg.outputs.email }}</email>
# <homepage>${{ steps.cfg.outputs.homepage }}</homepage>
# <tracker>${{ steps.cfg.outputs.tracker }}</tracker>
# <repository>${{ steps.cfg.outputs.repository }}</repository>
# <download_url>${{ steps.upload_asset.outputs.download_url }}</download_url>
# <experimental>${{ steps.cfg.outputs.experimental }}</experimental>
# <deprecated>${{ steps.cfg.outputs.deprecated }}</deprecated>
# </pyqgis_plugin>
# EOF
# )
# {
# echo "block<<EOF"
# echo "$BLOCK"
# echo "EOF"
# } >> "$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 }}\"
# }
# }"

2
.gitignore vendored
View File

@@ -174,4 +174,4 @@ cython_debug/
# PyPI configuration file
.pypirc
metadata.txt
release.cmd

View File

@@ -1,5 +0,0 @@
0.2.0
- Feature XY hinzugefügt
- Bug Z behoben
0.1.0
- Initiales Release

View File

@@ -1,14 +0,0 @@
[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

View File

@@ -1 +0,0 @@
sn_test

18
changelog.txt Normal file
View File

@@ -0,0 +1,18 @@
---
Version 1-testing:
- nach testing gemerged
---
Version 11-unstable:
- metadata.txt aktualisiert
---
Version 10-unstable:
- Änderung 5
- Änderung 6
---
Version 9-unstable:
- Änderung 3
- Änderung 4
---
Version 8-unstable:
- Änderung 1
- Änderung 2

View File

@@ -1,13 +1,14 @@
[general]
name=LNO Sachsen | Plugin Test Action
qgisMinimumVersion=3.0
qgisMinimumVersion=3.40
qgisMaximumVersion=3.99
description=Test plugin for release pipeline
version=@VERSION@
version=1-testing
author=Daniel Helbig, Michael Otto
email=daniel.helbig@kreis-meissen.de, michael.otto@landkreis-mittelsachsen.de
email=daniel.helbig@kreis-meissen.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
repository=https://entwicklung.flurneuordnung-sachsen.de/AG_QGIS/Plugin_Test_Action/src/branch/testing/
experimental=true
deprecated=false
supportsQt6=true

11
plugin.cfg Normal file
View File

@@ -0,0 +1,11 @@
name=LNO Sachsen | Plugin Test Action
description=Test plugin for release pipeline
author=Daniel Helbig
email=daniel.helbig@kreis-meissen.de
qgisMinimumVersion=3.0
qgisMaximumVersion=3.99
deprecated=False
experimental=True
supportsQt6=Yes
zip_folder=plugin_folder