diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 8c1191e0..3df101c1 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -156,6 +156,9 @@ jobs: - name: Create Release Information run: | + $SHORT_SHA = $env:GITHUB_SHA.Substring(0, 7) + echo "SHORT_SHA=$SHORT_SHA" >> $env:GITHUB_ENV + [xml]$xmlContent = Get-Content -Path "Natsurainko.FluentLauncher\Package-Preview.appxmanifest" $version = $xmlContent.Package.Identity.Version @@ -173,7 +176,7 @@ jobs: exit 1 } - $json = & .\$installerPath generateReleaseJson --updatePackageFiles "${{ github.workspace }}\updatePackage-x64.zip" "${{ github.workspace }}\updatePackage-arm64.zip" --stableVersion $version --commit "${{ env.SHORT_SHA }}" + $json = & .\$installerPath generateReleaseJson --updatePackageFiles "${{ github.workspace }}\updatePackage-x64.zip" "${{ github.workspace }}\updatePackage-arm64.zip" --stableVersion $version --commit "${{ env.SHORT_SHA }}" | Out-String $jsonObject = $json | ConvertFrom-Json $currentPreviewVersion = $jsonObject.currentPreviewVersion @@ -183,8 +186,6 @@ jobs: - name: Create Tag run: | - $SHORT_SHA = $env:GITHUB_SHA.Substring(0, 7) - echo "SHORT_SHA=$SHORT_SHA" >> $env:GITHUB_ENV git tag -a "pre-release-${{ env.currentPreviewVersion }}-${{ env.SHORT_SHA }}" -m "pre-release-${{ env.currentPreviewVersion }}-${{ env.SHORT_SHA }}" git push origin "pre-release-${{ env.currentPreviewVersion }}-${{ env.SHORT_SHA }}" @@ -196,4 +197,7 @@ jobs: generateReleaseNotes: true prerelease: true tag: "pre-release-${{ env.currentPreviewVersion }}-${{ env.SHORT_SHA }}" - body: "``` json\n${{ env.json }}\n```" \ No newline at end of file + body: | + ``` json + ${{ env.json }} + ``` \ No newline at end of file