build-git-installers #128
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-git-installers | |
on: | |
push: | |
tags: | |
- 'v[0-9]*vfs*' # matches "v<number><any characters>vfs<any characters>" | |
jobs: | |
# Validate installers | |
validate-installers: | |
permissions: | |
actions: read # This is needed to access private repositories' build artifacts | |
name: Validate installers | |
strategy: | |
matrix: | |
component: | |
- os: macos-latest-xl-arm64 | |
artifact: osx-signed-arm64-pkg | |
command: git | |
runs-on: ${{ matrix.component.os }} | |
steps: | |
- name: debug with tmate | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
detached: true | |
- name: reuse ${{ matrix.component.artifact }} artifact | |
shell: bash | |
run: | | |
run_id=6266717642 && | |
name=${{ matrix.component.artifact }} && | |
curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ | |
-L https://api.github.com/repos/${{github.repository}}/actions/runs/$run_id/artifacts | | |
jq -r '.artifacts[] | select(.name | test("'$name'")) | [.name, .archive_download_url] | @tsv' | | |
tr -d '\r' | | |
while read name url | |
do | |
echo "$name" | |
curl -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ | |
-#sLo /tmp/"$name".zip "$url" && | |
unzip -q /tmp/"$name".zip | |
done | |
- name: Download artifacts | |
if: false | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.component.artifact }} | |
- name: Install Windows | |
if: contains(matrix.component.os, 'windows') | |
shell: pwsh | |
run: | | |
$exePath = Get-ChildItem -Path ./*.exe | %{$_.FullName} | |
Start-Process -Wait -FilePath "$exePath" -ArgumentList "/SILENT /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLOWDOWNGRADE=1" | |
- name: Install Linux | |
if: contains(matrix.component.os, 'ubuntu') | |
run: | | |
debpath=$(find ./*.deb) | |
sudo apt install $debpath | |
- name: Install macOS | |
if: contains(matrix.component.os, 'macos') | |
run: | | |
# avoid letting Homebrew's `git` in `/opt/homebrew/bin` override `/usr/local/bin/git` | |
test arm64 != "$(uname -m)" || | |
brew uninstall git | |
pkgpath=$(find ./*.pkg) | |
sudo installer -pkg $pkgpath -target / | |
- name: Validate | |
shell: bash | |
run: | | |
"${{ matrix.component.command }}" --version | sed 's/git version //' >actual | |
echo ${{ needs.prereqs.outputs.tag_version }} >expect | |
cmp expect actual || exit 1 | |
# End validate installers |