chore: downgrade version to 1.9.1 in plugin header
This commit is contained in:
111
.github/workflows/release.yml
vendored
111
.github/workflows/release.yml
vendored
@@ -26,6 +26,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Determine plugin version
|
- name: Determine plugin version
|
||||||
id: meta
|
id: meta
|
||||||
@@ -68,6 +69,11 @@ jobs:
|
|||||||
print('manifest.json aangemaakt/bijgewerkt')
|
print('manifest.json aangemaakt/bijgewerkt')
|
||||||
PY
|
PY
|
||||||
|
|
||||||
|
- name: Toon manifest.json
|
||||||
|
run: |
|
||||||
|
echo "manifest.json inhoud:"
|
||||||
|
cat manifest.json
|
||||||
|
|
||||||
- name: Commit & push manifest.json
|
- name: Commit & push manifest.json
|
||||||
run: |
|
run: |
|
||||||
if git diff --quiet -- manifest.json; then
|
if git diff --quiet -- manifest.json; then
|
||||||
@@ -85,7 +91,7 @@ jobs:
|
|||||||
id: tagcheck
|
id: tagcheck
|
||||||
run: |
|
run: |
|
||||||
TAG="v${{ steps.meta.outputs.version }}"
|
TAG="v${{ steps.meta.outputs.version }}"
|
||||||
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
if git ls-remote --tags origin "refs/tags/$TAG" | grep -q "$TAG"; then
|
||||||
echo "exists=true" >> "$GITHUB_OUTPUT"
|
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "exists=false" >> "$GITHUB_OUTPUT"
|
echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||||
@@ -134,12 +140,99 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
RELEASE_NOTES: ${{ github.event.inputs.release_notes }}
|
RELEASE_NOTES: ${{ github.event.inputs.release_notes }}
|
||||||
|
|
||||||
- name: Maak GitHub release
|
- name: Maak Gitea tag
|
||||||
if: steps.tagcheck.outputs.exists == 'false'
|
if: steps.tagcheck.outputs.exists == 'false'
|
||||||
uses: softprops/action-gh-release@v2
|
env:
|
||||||
with:
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
tag_name: v${{ steps.meta.outputs.version }}
|
GITEA_SERVER_URL: ${{ vars.GITEA_SERVER_URL }}
|
||||||
name: Siti AI Product Teksten v${{ steps.meta.outputs.version }}
|
GITEA_REPOSITORY: ${{ vars.GITEA_REPOSITORY }}
|
||||||
body: ${{ steps.releasebody.outputs.text }}
|
run: |
|
||||||
generate_release_notes: true
|
VERSION="${{ steps.meta.outputs.version }}"
|
||||||
files: ${{ steps.package.outputs.asset_path }}
|
TAG="v$VERSION"
|
||||||
|
|
||||||
|
if [ -z "$GITEA_TOKEN" ]; then
|
||||||
|
echo "::error::GITEA_TOKEN ontbreekt. Voeg deze secret toe om tags te kunnen pushen."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
SERVER_URL="${GITEA_SERVER_URL:-${GITHUB_SERVER_URL}}"
|
||||||
|
REPO="${GITEA_REPOSITORY:-${GITHUB_REPOSITORY}}"
|
||||||
|
if [ -z "$SERVER_URL" ] || [ -z "$REPO" ]; then
|
||||||
|
echo "::error::Kan Gitea server of repository niet bepalen. Stel GITEA_SERVER_URL en GITEA_REPOSITORY in."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
HOST="${SERVER_URL#https://}"
|
||||||
|
HOST="${HOST#http://}"
|
||||||
|
AUTH_URL="https://oauth2:${GITEA_TOKEN}@${HOST}/${REPO}.git"
|
||||||
|
|
||||||
|
git tag -a "$TAG" -m "$TAG"
|
||||||
|
git push "$AUTH_URL" "$TAG"
|
||||||
|
|
||||||
|
- name: Maak Gitea release
|
||||||
|
if: steps.tagcheck.outputs.exists == 'false'
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
GITEA_SERVER_URL: ${{ vars.GITEA_SERVER_URL }}
|
||||||
|
GITEA_REPOSITORY: ${{ vars.GITEA_REPOSITORY }}
|
||||||
|
run: |
|
||||||
|
VERSION="${{ steps.meta.outputs.version }}"
|
||||||
|
TAG="v$VERSION"
|
||||||
|
ASSET_PATH="${{ steps.package.outputs.asset_path }}"
|
||||||
|
ASSET_NAME="${{ steps.package.outputs.asset_name }}"
|
||||||
|
|
||||||
|
if [ -z "$GITEA_TOKEN" ]; then
|
||||||
|
echo "::error::GITEA_TOKEN ontbreekt. Voeg deze secret toe om releases te kunnen maken."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
SERVER_URL="${GITEA_SERVER_URL:-${GITHUB_SERVER_URL}}"
|
||||||
|
REPO="${GITEA_REPOSITORY:-${GITHUB_REPOSITORY}}"
|
||||||
|
if [ -z "$SERVER_URL" ] || [ -z "$REPO" ]; then
|
||||||
|
echo "::error::Kan Gitea server of repository niet bepalen. Stel GITEA_SERVER_URL en GITEA_REPOSITORY in."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
API_URL="${SERVER_URL%/}/api/v1"
|
||||||
|
BODY="${{ steps.releasebody.outputs.text }}"
|
||||||
|
|
||||||
|
export TAG
|
||||||
|
export BODY
|
||||||
|
|
||||||
|
python3 - <<'PY'
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
payload = {
|
||||||
|
"tag_name": os.environ["TAG"],
|
||||||
|
"name": f"Siti AI Product Teksten {os.environ['TAG']}",
|
||||||
|
"body": os.environ.get("BODY", ""),
|
||||||
|
"target_commitish": os.environ.get("GITHUB_SHA") or os.environ.get("GITEA_SHA", ""),
|
||||||
|
}
|
||||||
|
|
||||||
|
with open("release.json", "w", encoding="utf-8") as handle:
|
||||||
|
json.dump(payload, handle, ensure_ascii=False)
|
||||||
|
PY
|
||||||
|
|
||||||
|
RESPONSE=$(curl -sS -X POST "$API_URL/repos/$REPO/releases" \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d @release.json)
|
||||||
|
|
||||||
|
RELEASE_ID=$(python3 - <<'PY'
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
data = json.loads(sys.stdin.read())
|
||||||
|
print(data.get('id', ''))
|
||||||
|
PY
|
||||||
|
<<< "$RESPONSE")
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ]; then
|
||||||
|
echo "::error::Kon release-ID niet bepalen. Response: $RESPONSE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -sS -X POST "$API_URL/repos/$REPO/releases/$RELEASE_ID/assets?name=$ASSET_NAME" \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/zip" \
|
||||||
|
--data-binary "@$ASSET_PATH"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* Plugin Name: SitiAI Product Teksten
|
* Plugin Name: SitiAI Product Teksten
|
||||||
* Description: Genereer productteksten met diverse AI-aanbieders rechtstreeks vanuit WooCommerce.
|
* Description: Genereer productteksten met diverse AI-aanbieders rechtstreeks vanuit WooCommerce.
|
||||||
* Version: 1.9.2
|
* Version: 1.9.1
|
||||||
* Author: Roberto Guagliardo | SitiWeb
|
* Author: Roberto Guagliardo | SitiWeb
|
||||||
* Author URI: https://sitiweb.nl/
|
* Author URI: https://sitiweb.nl/
|
||||||
* Text Domain: siti-ai-product-content-generator
|
* Text Domain: siti-ai-product-content-generator
|
||||||
|
|||||||
Reference in New Issue
Block a user