test release #5

Merged
haylan merged 61 commits from main into release 2026-03-18 00:06:21 +01:00
Showing only changes of commit 6370bb5b09 - Show all commits

View File

@@ -17,18 +17,35 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: Extract version from CHANGELOG
- name: Extract version and body from CHANGELOG
id: changelog
run: |
LATEST=$(grep -E '^## \[(.*)\]' CHANGELOG.md | grep -v '\[Unreleased\]' | head -n1 | sed -E 's/^## \[([^\]]+)\].*/\1/')
# Extract the latest released version (skip Unreleased)
LATEST=$(grep -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | head -n1 | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/')
if [ -z "$LATEST" ]; then
echo "No released version found in CHANGELOG.md"
exit 1
else
echo "Released version found: $LATEST"
echo "version=$LATEST" >> $GITHUB_OUTPUT
fi
echo "Released version found: $LATEST"
echo "version=$LATEST" >> $GITHUB_OUTPUT
# Extract the body: lines until the next ## header
BODY=$(awk -v ver="$LATEST" '
$0 ~ "^## \\[" ver "\\]" {found=1; next}
found && $0 ~ "^## \\[" {exit}
found {print}
' CHANGELOG.md)
# Trim leading/trailing empty lines
BODY=$(echo "$BODY" | sed '/^\s*$/d')
# Output body safely for GitHub Actions
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$BODY" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Create Release also creates an Tag
# - name: Create git tag
# uses: alazhar/gitea-action-autotag@v1
@@ -59,8 +76,8 @@ jobs:
with:
server_url: ${{ vars.SERVER_URL }}
tag_name: "${{ steps.changelog.outputs.version }}"
name: "Release ${{ steps.changelog.outputs.version }}"
body: "${{ steps.changelog.outputs.description }}"
name: Release ${{ steps.changelog.outputs.version }}
body: ${{ steps.changelog.outputs.description }}
files: |
godot-${{ matrix.preset }}-v${{ steps.changelog.outputs.version }}
draft: false