6 Commits

Author SHA1 Message Date
94329dc91a Merge pull request 'Fix: Release not creating Zip file created' (#9) from feature-single-product into main
All checks were successful
Create Release / build (push) Successful in 3s
Reviewed-on: #9
2025-05-20 21:41:37 +00:00
ca3275fb4b Merge branch 'main' into feature-single-product 2025-05-20 14:38:37 -07:00
609883fc7f resolving issue with release not having rsync 2025-05-20 14:37:42 -07:00
60d5060398 Merge pull request 'Update automation to fix folder mess with updates and notes' (#8) from feature-single-product into main
Some checks failed
Create Release / build (push) Failing after 2s
Reviewed-on: #8
2025-05-20 21:34:21 +00:00
49703fd66d Merge branch 'main' into feature-single-product 2025-05-20 21:33:45 +00:00
9e1d8b8684 Update automation to fix folder mess with updates and notes 2025-05-20 14:29:59 -07:00
2 changed files with 21 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,24 @@ jobs:
- name: Create ZIP archive
run: |
zip -r fourthwall-store-embed.zip . -x ".git/*" ".gitea/*"
# Create a temp directory with the correct plugin folder name
mkdir -p /tmp/fourthwall-store-embed
# Copy files to the temp directory (excluding git and other unnecessary files)
cp -r * /tmp/fourthwall-store-embed/ 2>/dev/null || true
# Exclude .git and .gitea directories
rm -rf /tmp/fourthwall-store-embed/.git /tmp/fourthwall-store-embed/.gitea 2>/dev/null || true
# Create the ZIP file with the proper structure
cd /tmp
zip -r $GITHUB_WORKSPACE/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