diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12d604f..b5aa139 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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<> $GITHUB_OUTPUT - echo "$CONTENT" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + if [ -f CHANGELOG.md ]; then + CONTENT=$(cat CHANGELOG.md) + echo "content<> $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<> $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