diff --git a/.github/workflows/update-studio-docs.yml b/.github/workflows/update-studio-docs.yml index 490da685d5..e945045bb8 100644 --- a/.github/workflows/update-studio-docs.yml +++ b/.github/workflows/update-studio-docs.yml @@ -136,14 +136,38 @@ jobs: mv "$FILE.new" "$FILE" + # ------------------------------------------------- + # Fetch latest stable ABP version + # ------------------------------------------------- + - name: Fetch latest ABP stable version + id: abp + env: + GH_TOKEN: ${{ secrets.BOT_SECRET }} + run: | + RESPONSE=$(curl -fsS \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/abpframework/abp/releases/latest) + + ABP_VERSION=$(echo "$RESPONSE" | jq -r '.tag_name') + + if [ -z "$ABP_VERSION" ] || [ "$ABP_VERSION" = "null" ]; then + echo "❌ Could not determine latest ABP version" + exit 1 + fi + + echo "Latest ABP version: $ABP_VERSION" + echo "ABP_VERSION=$ABP_VERSION" >> $GITHUB_ENV + # ------------------------------------------------- # Update version-mapping.md (INSIDE table) # ------------------------------------------------- - name: Update version-mapping.md (smart) + env: + STUDIO_VERSION: ${{ github.event.client_payload.version }} + ABP_VERSION: ${{ env.ABP_VERSION }} run: | FILE="docs/en/studio/version-mapping.md" - STUDIO_VERSION="${{ github.event.client_payload.version }}" - ABP_VERSION="dev" # gerekiyorsa payload’dan alabilirsin mkdir -p docs/en/studio @@ -154,16 +178,17 @@ jobs: exit 0 fi - python3 <<'EOF' + python3 <