forked from AG_QGIS/Plugin_Test_Action
Compare commits
30 Commits
v20-testin
...
v72-testin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ee93bdc0d | ||
|
|
8ee99fa5da | ||
|
|
98fb235fb9 | ||
|
|
a58f6255fc | ||
|
|
78ffc6d6d2 | ||
|
|
00785eeabd | ||
|
|
8f0e6a9978 | ||
|
|
5f756be077 | ||
|
|
a6837e5fd2 | ||
|
|
dac2a8e973 | ||
|
|
0fa2861040 | ||
|
|
4790001f30 | ||
|
|
2eacee23f5 | ||
|
|
5d12fefb1d | ||
|
|
495a4ac049 | ||
|
|
a69d00df31 | ||
|
|
f77a8d34a0 | ||
|
|
2cb504ba51 | ||
|
|
44aae815f5 | ||
|
|
af43bfeab9 | ||
|
|
c55dedbbe1 | ||
|
|
067e0f3170 | ||
|
|
2e65ec4bc4 | ||
|
|
0ce29c9e84 | ||
|
|
75b7e8073a | ||
|
|
88a62af7c8 | ||
|
|
049c0f64ed | ||
|
|
efc695457f | ||
|
|
c73cde2e57 | ||
|
|
18e76984bb |
@@ -1,4 +1,3 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: Release Plugin
|
||||
|
||||
on:
|
||||
@@ -24,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
|
||||
@@ -43,53 +40,103 @@ 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
|
||||
|
||||
echo "DEBUG | Version: $VERSION"
|
||||
echo "DEBUG | Kanal: $CHANNEL"
|
||||
- name: plugin.info einlesen
|
||||
id: info
|
||||
run: |
|
||||
cd repo
|
||||
while IFS='=' read -r key value; do
|
||||
echo "$key=$value" >> $GITHUB_OUTPUT
|
||||
done < plugin.info
|
||||
|
||||
- name: Changelog einlesen
|
||||
id: changelog
|
||||
run: |
|
||||
cd repo
|
||||
|
||||
# Aktueller Block = alles vor dem ersten ---
|
||||
CURRENT=$(awk '/^---/{exit} {print}' changelog.txt)
|
||||
|
||||
# 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" "$HISTORY")
|
||||
|
||||
echo "DEBUG | Aktueller Changelog:"
|
||||
echo "$CURRENT"
|
||||
|
||||
# Für GITHUB_OUTPUT: Multiline via EOF-Marker
|
||||
echo "current<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "$CURRENT" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "full<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "$FULL" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: metadata.txt erzeugen
|
||||
run: |
|
||||
cd repo
|
||||
|
||||
VERSION="${{ steps.releaseinfo.outputs.version }}"
|
||||
TEMPLATE="templates/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//\{\{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//\{\{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 }}}"
|
||||
|
||||
echo "DEBUG | metadata.txt erzeugt:"
|
||||
cat metadata.txt
|
||||
printf "%s\n" "$CONTENT" > "$OUT"
|
||||
|
||||
- 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"
|
||||
ZIP_FOLDER="${{ steps.info.outputs.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' \
|
||||
@@ -97,42 +144,36 @@ 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
|
||||
- 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}')
|
||||
--argjson draft "${{ steps.releaseinfo.outputs.draft }}" \
|
||||
--argjson prerelease "${{ steps.releaseinfo.outputs.prerelease }}" \
|
||||
'{tag_name: $tag, name: $name, body: $body, draft: $draft, prerelease: $prerelease}')
|
||||
|
||||
echo "Sende API‑Request an: $API_URL"
|
||||
echo "JSON‑Payload:"
|
||||
echo "$JSON"
|
||||
# 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}')
|
||||
|
||||
# Release erstellen
|
||||
API_RESPONSE=$(curl -s -X POST "$API_URL" \
|
||||
-H "accept: application/json" \
|
||||
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||
@@ -141,198 +182,97 @@ 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"
|
||||
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
|
||||
echo "Fehler beim Erstellen des Releases!"
|
||||
echo "$API_RESPONSE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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 }}"
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
echo "Release erfolgreich erstellt. ID: $RELEASE_ID"
|
||||
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
- name: Debug Info
|
||||
- name: Payload erzeugen
|
||||
run: |
|
||||
echo "Tag: $GITEA_REF_NAME"
|
||||
uname -a
|
||||
cd repo
|
||||
|
||||
# - name: Read plugin.cfg
|
||||
# id: cfg
|
||||
# run: |
|
||||
# CFG=".plugin/plugin.cfg"
|
||||
VERSION="${{ steps.releaseinfo.outputs.version }}"
|
||||
CHANNEL="${{ steps.releaseinfo.outputs.channel }}"
|
||||
ZIP_NAME="${{ steps.zip.outputs.zip_name }}"
|
||||
|
||||
# get_value() {
|
||||
# grep -i "^$1" "$CFG" | head -1 | cut -d= -f2- | tr -d '\r' | xargs
|
||||
# }
|
||||
DOWNLOAD_URL="https://${{ vars.RELEASE_URL }}/${GITHUB_REPOSITORY}/releases/download/${{ github.ref_name }}/${ZIP_NAME}"
|
||||
|
||||
# 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
|
||||
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 "${{ 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
|
||||
}' > payload.json
|
||||
|
||||
# # 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: Repository aktualisieren
|
||||
run: |
|
||||
OWNER="AG_QGIS"
|
||||
WORKFLOW="update.yml"
|
||||
|
||||
# - name: Generate metadata.txt
|
||||
# run: |
|
||||
# VERSION="${{ steps.info.outputs.version }}"
|
||||
# CHANGELOG=$(cat .plugin/changelog.txt)
|
||||
PAYLOAD_B64=$(base64 -w0 repo/payload.json)
|
||||
|
||||
# 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
|
||||
JSON="{\"ref\":\"feature/release\",\"inputs\":{\"payload\":\"$PAYLOAD_B64\"}}"
|
||||
|
||||
# # Nur fürs Log:
|
||||
# cat metadata.txt
|
||||
echo "DEBUG | Sende JSON:"
|
||||
echo "$JSON"
|
||||
|
||||
# - 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 }}\"
|
||||
# }
|
||||
# }"
|
||||
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"
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -174,4 +174,5 @@ cython_debug/
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
metadata.txt
|
||||
metadata.txt
|
||||
release.cmd
|
||||
@@ -1,13 +0,0 @@
|
||||
[general]
|
||||
name=LNO Sachsen | Plugin Test Action
|
||||
qgisMinimumVersion=3.0
|
||||
qgisMaximumVersion=3.99
|
||||
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
|
||||
experimental=True
|
||||
deprecated=False
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
sn_test
|
||||
@@ -1,4 +1,6 @@
|
||||
0.2.0
|
||||
- Ganz viele neue Sachen
|
||||
---
|
||||
61
|
||||
- Feature XY hinzugefügt
|
||||
- Bug Z behoben
|
||||
0.1.0
|
||||
11
plugin.info
Normal file
11
plugin.info
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
qgisMinimumVersion=3.0
|
||||
qgisMaximumVersion=3.99
|
||||
deprecated=False
|
||||
experimental=True
|
||||
supportsQt6=Yes
|
||||
|
||||
zip_folder=plugin_folder
|
||||
14
templates/metadata.template
Normal file
14
templates/metadata.template
Normal file
@@ -0,0 +1,14 @@
|
||||
[general]
|
||||
name={{NAME}}
|
||||
qgisMinimumVersion={{QGIS_MIN}}
|
||||
qgisMaximumVersion={{QGIS_MAX}}
|
||||
description={{DESCRIPTION}}
|
||||
version={{VERSION}}
|
||||
author={{AUTHOR}}
|
||||
email={{EMAIL}}
|
||||
homepage=https://{{HOMEPAGE}}
|
||||
tracker=https://{{TRACKER}}/issues
|
||||
repository=https://{{REPOSITORY}}
|
||||
experimental={{EXPERIMENTAL}}
|
||||
deprecated={{DEPRECATED}}
|
||||
supportsQt6={{QT6}}
|
||||
Reference in New Issue
Block a user