Update automation to fix folder mess with updates and notes
This commit is contained in:
parent
1955b14ac5
commit
9e1d8b8684
@ -25,7 +25,6 @@ jobs:
|
|||||||
echo "version=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_OUTPUT
|
echo "version=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# NEW STEP: Generate release notes from commits
|
|
||||||
- name: Generate release notes
|
- name: Generate release notes
|
||||||
id: release_notes
|
id: release_notes
|
||||||
run: |
|
run: |
|
||||||
@ -40,18 +39,11 @@ jobs:
|
|||||||
COMMITS=$(git log --pretty=format:"* %s (%h)" ${LATEST_TAG}..HEAD --no-merges)
|
COMMITS=$(git log --pretty=format:"* %s (%h)" ${LATEST_TAG}..HEAD --no-merges)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape newlines and special characters for GitHub Actions
|
# Create release notes with header (without encoding newlines)
|
||||||
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
|
|
||||||
echo "notes<<EOF" >> $GITHUB_OUTPUT
|
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
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Update plugin version
|
- name: Update plugin version
|
||||||
@ -63,13 +55,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Create ZIP archive
|
- name: Create ZIP archive
|
||||||
run: |
|
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
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
token: "${{ secrets.REPO_TOKEN }}"
|
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 }}
|
tag_name: ${{ steps.get_version.outputs.version }}
|
||||||
body: "${{ steps.release_notes.outputs.notes }}"
|
body: "${{ steps.release_notes.outputs.notes }}"
|
||||||
files: |
|
files: |
|
||||||
|
@ -35,8 +35,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Create plugin zip
|
- name: Create plugin zip
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
mkdir -p /tmp/fourthwall-store-embed
|
||||||
zip -r build/fourthwall-store-embed.zip . -x ".git/*" ".gitea/*" "build/*" "*.git*"
|
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
|
- name: Upload zip to release
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user