Update automation to fix folder mess with updates and notes

This commit is contained in:
Josh Knapp 2025-05-20 14:29:59 -07:00
parent 1955b14ac5
commit 9e1d8b8684
2 changed files with 13 additions and 16 deletions

View File

@ -25,7 +25,6 @@ jobs:
echo "version=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_OUTPUT
fi
# NEW STEP: Generate release notes from commits
- name: Generate release notes
id: release_notes
run: |
@ -40,18 +39,11 @@ jobs:
COMMITS=$(git log --pretty=format:"* %s (%h)" ${LATEST_TAG}..HEAD --no-merges)
fi
# Escape newlines and special characters for GitHub Actions
COMMITS="${COMMITS//'%'/'%25'}"
COMMITS="${COMMITS//$'\n'/'%0A'}"
COMMITS="${COMMITS//$'\r'/'%0D'}"
# Create release notes with header
NOTES="## What's New in ${{ steps.get_version.outputs.version }}%0A%0A"
NOTES+="$COMMITS"
# Output to GitHub Actions
# Create release notes with header (without encoding newlines)
echo "notes<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "## What's New in ${{ steps.get_version.outputs.version }}" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "$COMMITS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Update plugin version
@ -63,13 +55,16 @@ jobs:
- name: Create ZIP archive
run: |
zip -r fourthwall-store-embed.zip . -x ".git/*" ".gitea/*"
mkdir -p /tmp/fourthwall-store-embed
rsync -av --exclude=".git" --exclude=".gitea" --exclude="build" . /tmp/fourthwall-store-embed/
cd /tmp
zip -r $GITEA_WORK_DIR/fourthwall-store-embed.zip fourthwall-store-embed
- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.REPO_TOKEN }}"
title: Fourthwall-store-embed Release ${{ steps.get_version.outputs.version }}
title: "Fourthwall-store-embed Release ${{ steps.get_version.outputs.version }}"
tag_name: ${{ steps.get_version.outputs.version }}
body: "${{ steps.release_notes.outputs.notes }}"
files: |

View File

@ -35,8 +35,10 @@ jobs:
- name: Create plugin zip
run: |
mkdir -p build
zip -r build/fourthwall-store-embed.zip . -x ".git/*" ".gitea/*" "build/*" "*.git*"
mkdir -p /tmp/fourthwall-store-embed
rsync -av --exclude=".git" --exclude=".gitea" --exclude="build" . /tmp/fourthwall-store-embed/
cd /tmp
zip -r $GITEA_WORK_DIR/fourthwall-store-embed.zip fourthwall-store-embed
- name: Upload zip to release
uses: actions/upload-release-asset@v1