1
1
mirror of https://github.com/neosubhamoy/pytubepp-helper.git synced 2026-02-04 11:22:22 +05:30

(ci/cd): fixed changelog reading logic for windows

This commit is contained in:
2025-02-11 20:06:34 +05:30
Verified
parent 99bafd38b0
commit ec49a72824

View File

@@ -55,13 +55,33 @@ jobs:
- name: 🛠️ Install frontend dependencies
run: npm install
- name: 📄 Read CHANGELOG
id: changelog
- name: 📄 Read CHANGELOG (Unix)
if: matrix.platform != 'windows-latest'
id: changelog_unix
shell: bash
run: |
CONTENT=$(cat CHANGELOG.md)
echo "content<<EOF" >> $GITHUB_OUTPUT
echo "$CONTENT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
if [ -f CHANGELOG.md ]; then
CONTENT=$(cat CHANGELOG.md)
echo "content<<EOF" >> $GITHUB_OUTPUT
echo "$CONTENT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
else
echo "content=No changelog found" >> $GITHUB_OUTPUT
fi
- name: 📄 Read CHANGELOG (Windows)
if: matrix.platform == 'windows-latest'
id: changelog_windows
shell: pwsh
run: |
if (Test-Path "CHANGELOG.md") {
$content = Get-Content -Path CHANGELOG.md -Raw
"content<<EOF" >> $env:GITHUB_OUTPUT
$content >> $env:GITHUB_OUTPUT
"EOF" >> $env:GITHUB_OUTPUT
} else {
"content=No changelog found" >> $env:GITHUB_OUTPUT
}
- name: 🚀 Build and publish
uses: tauri-apps/tauri-action@v0
@@ -73,7 +93,7 @@ jobs:
with:
tagName: ${{ github.ref_name }}
releaseName: ${{ github.event.repository.name }}-${{ github.ref_name }}
releaseBody: ${{ steps.changelog.outputs.content }}
releaseBody: ${{ matrix.platform == 'windows-latest' && steps.changelog_windows.outputs.content || steps.changelog_unix.outputs.content }}
releaseDraft: true
prerelease: false
includeUpdaterJson: true