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:
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@@ -55,13 +55,33 @@ jobs:
|
|||||||
- name: 🛠️ Install frontend dependencies
|
- name: 🛠️ Install frontend dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: 📄 Read CHANGELOG
|
- name: 📄 Read CHANGELOG (Unix)
|
||||||
id: changelog
|
if: matrix.platform != 'windows-latest'
|
||||||
|
id: changelog_unix
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
if [ -f CHANGELOG.md ]; then
|
||||||
CONTENT=$(cat CHANGELOG.md)
|
CONTENT=$(cat CHANGELOG.md)
|
||||||
echo "content<<EOF" >> $GITHUB_OUTPUT
|
echo "content<<EOF" >> $GITHUB_OUTPUT
|
||||||
echo "$CONTENT" >> $GITHUB_OUTPUT
|
echo "$CONTENT" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $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
|
- name: 🚀 Build and publish
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
@@ -73,7 +93,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tagName: ${{ github.ref_name }}
|
tagName: ${{ github.ref_name }}
|
||||||
releaseName: ${{ github.event.repository.name }}-${{ 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
|
releaseDraft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
includeUpdaterJson: true
|
includeUpdaterJson: true
|
||||||
|
|||||||
Reference in New Issue
Block a user