mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-30 10:05:58 +00:00
Skip MSI build for prerelease versions
- MSI versions cannot have a suffix such as -rc1, so wix build fails - Release is still published
This commit is contained in:
1 file changed
+16
-6
@@ -99,24 +99,31 @@ jobs:
|
||||
needs: release
|
||||
runs-on: windows-latest
|
||||
environment: release
|
||||
env:
|
||||
# MSI versions cannot have a suffix such as -rc1
|
||||
BUILD_MSI: ${{ !contains(needs.release.outputs.version, '-') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: actions/download-artifact@v8
|
||||
if: env.BUILD_MSI == 'true'
|
||||
with:
|
||||
name: windows-binaries
|
||||
path: dist
|
||||
|
||||
- uses: actions/setup-dotnet@v6
|
||||
if: env.BUILD_MSI == 'true'
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
# WiX 5 is the last release that does not require accepting the WiX
|
||||
# Open Source Maintenance Fee EULA; main.wxs uses the v4/v5 schema.
|
||||
- name: Install WiX
|
||||
if: env.BUILD_MSI == 'true'
|
||||
run: dotnet tool install --global wix --version 5.0.2
|
||||
|
||||
- name: Build Windows MSI installers
|
||||
if: env.BUILD_MSI == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
@@ -130,6 +137,7 @@ jobs:
|
||||
ls -la dist/*.msi
|
||||
|
||||
- uses: actions/upload-artifact@v7
|
||||
if: env.BUILD_MSI == 'true'
|
||||
with:
|
||||
name: windows-msi
|
||||
path: dist/*.msi
|
||||
@@ -142,12 +150,14 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
V='${{ needs.release.outputs.version }}'
|
||||
sums="fzf_${V}_checksums.txt"
|
||||
# Drop MSI lines from a previous run of this job
|
||||
gh release download "v$V" -p "$sums" -O - | grep -v '\.msi$' > "dist/$sums"
|
||||
# sha256sum on Windows may print '<hash> *<name>'
|
||||
(cd dist && sha256sum fzf-*.msi) | sed 's/ \*/ /' >> "dist/$sums"
|
||||
gh release upload "v$V" dist/*.msi "dist/$sums" --clobber
|
||||
if [[ $BUILD_MSI == true ]]; then
|
||||
sums="fzf_${V}_checksums.txt"
|
||||
# Drop MSI lines from a previous run of this job
|
||||
gh release download "v$V" -p "$sums" -O - | grep -v '\.msi$' > "dist/$sums"
|
||||
# sha256sum on Windows may print '<hash> *<name>'
|
||||
(cd dist && sha256sum fzf-*.msi) | sed 's/ \*/ /' >> "dist/$sums"
|
||||
gh release upload "v$V" dist/*.msi "dist/$sums" --clobber
|
||||
fi
|
||||
gh release edit "v$V" --draft=false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
|
||||
Reference in new issue
Block a user