diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index e2c0ce1..cdbc4bf 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -152,6 +152,7 @@ jobs: --exclude='.gitea' \ --exclude='.plugin' \ --exclude='dist' \ + --exclude='plugin.cfg' \ ./ dist/${ZIP_FOLDER}/ cd dist @@ -286,3 +287,35 @@ jobs: -H "Content-Type: application/json" \ -d "$JSON" \ "https://${{ vars.RELEASE_URL }}/api/v1/repos/${OWNER}/Repository/actions/workflows/${WORKFLOW}/dispatches" + + - name: metadata.txt ins Repo committen + run: | + cd repo + + TAG="${{ github.ref_name }}" + VERSION="${{ steps.releaseinfo.outputs.version }}" + + # Branch aus Tag ableiten + case "$TAG" in + *-unstable*) + BRANCH="unstable" + ;; + *-testing*) + BRANCH="testing" + ;; + *) + BRANCH="main" + ;; + esac + + # Branch checkouten + git checkout "$BRANCH" + + # Falls es Änderungen gibt, commit und push + if git diff --quiet metadata.txt; then + echo "Keine Änderungen an metadata.txt" + else + git add metadata.txt + git commit -m "Update version to $VERSION" + git push origin "$BRANCH" + fi