Skip to content

Commit 77852df

Browse files
ldenningtondscho
authored andcommitted
release: add installer validation
Add basic installer validation to release pipeline for Windows, macOS, and Linux (Debian package only). Validation runs the installers/any necessary setup and checks that the installed version matches the expected version.
1 parent 2f718f4 commit 77852df

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,59 @@ jobs:
706706
path: signed
707707
# End build & sign Ubuntu package
708708

709+
# Validate installers
710+
validate-installers:
711+
name: Validate installers
712+
strategy:
713+
matrix:
714+
component:
715+
- os: ubuntu-latest
716+
artifact: deb-package-signed
717+
command: git
718+
- os: macos-latest
719+
artifact: osx-signed-pkg
720+
command: git
721+
- os: windows-latest
722+
artifact: win-installer-x86_64
723+
command: $PROGRAMFILES\Git\cmd\git.exe
724+
runs-on: ${{ matrix.component.os }}
725+
needs: [prereqs, windows_artifacts, osx_publish_dmg, ubuntu_sign-artifacts]
726+
steps:
727+
- name: Download artifacts
728+
uses: actions/download-artifact@v3
729+
with:
730+
name: ${{ matrix.component.artifact }}
731+
732+
- name: Install Windows
733+
if: contains(matrix.component.os, 'windows')
734+
shell: pwsh
735+
run: |
736+
$exePath = Get-ChildItem -Path ./*.exe | %{$_.FullName}
737+
Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1"
738+
739+
- name: Install Linux
740+
if: contains(matrix.component.os, 'ubuntu')
741+
run: |
742+
debpath=$(find ./*.deb)
743+
sudo apt install $debpath
744+
745+
- name: Install macOS
746+
if: contains(matrix.component.os, 'macos')
747+
run: |
748+
pkgpath=$(find ./*.pkg)
749+
sudo installer -pkg $pkgpath -target /
750+
751+
- name: Validate
752+
shell: bash
753+
run: |
754+
"${{ matrix.component.command }}" --version | sed 's/git version //' >actual
755+
echo ${{ needs.prereqs.outputs.tag_version }} >expect
756+
cmp expect actual || exit 1
757+
# End validate installers
758+
709759
create-github-release:
710760
runs-on: ubuntu-latest
711-
needs: [prereqs, windows_artifacts, osx_publish_dmg, ubuntu_sign-artifacts]
761+
needs: [validate-installers]
712762
if: |
713763
success() ||
714764
(needs.ubuntu_sign-artifacts.result == 'skipped' &&

0 commit comments

Comments
 (0)