2121 ui : ${{ steps.filter.outputs.ui }}
2222 docs : ${{ steps.filter.outputs.docs }}
2323 but_installer : ${{ steps.filter.outputs.but_installer }}
24+ install_script : ${{ steps.filter.outputs.install_script }}
2425 steps :
2526 - uses : actions/checkout@v6
2627 with :
5354 - 'Cargo.lock'
5455 - 'Cargo.toml'
5556 - 'crates/but-installer/**'
57+ install_script:
58+ - 'scripts/install.sh'
5659
5760 prettier :
5861 needs : changes
@@ -320,7 +323,8 @@ jobs:
320323 retention-days : 7
321324
322325 fetch-published-versions :
323- needs : build-installer
326+ needs : changes
327+ if : ${{ needs.changes.outputs.install_script == 'true' || needs.changes.outputs.but_installer == 'true' }}
324328 runs-on : ubuntu-22.04
325329 permissions :
326330 contents : none
@@ -334,6 +338,37 @@ jobs:
334338 echo "release_version=$(curl -s https://app.gitbutler.com/releases | jq -r .version)" >> $GITHUB_OUTPUT
335339 echo "nightly_version=$(curl -s https://app.gitbutler.com/releases/nightly | jq -r .version)" >> $GITHUB_OUTPUT
336340
341+ validate-install-script :
342+ needs :
343+ - changes
344+ - fetch-published-versions
345+ if : ${{ needs.changes.outputs.install_script == 'true' }}
346+ permissions :
347+ contents : read
348+ env :
349+ LATEST_RELEASE_VERSION : ${{ needs.fetch-published-versions.outputs.release_version }}
350+ LATEST_NIGHTLY_VERSION : ${{ needs.fetch-published-versions.outputs.nightly_version }}
351+ strategy :
352+ fail-fast : false
353+ matrix :
354+ include :
355+ - platform : macos-15 # [macOs, ARM64] - default target
356+ - platform : ubuntu-22.04 # [linux, x64]
357+ - platform : ubuntu-22.04-arm # [linux, ARM64]
358+ runs-on : ${{ matrix.platform }}
359+ steps :
360+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
361+ with :
362+ persist-credentials : false
363+ - name : Install release
364+ run : ./scripts/install.sh
365+ - name : Validate release version
366+ run : but --version | grep "but $LATEST_RELEASE_VERSION"
367+ - name : Install nightly
368+ run : ./scripts/install.sh nightly
369+ - name : Validate nightly version
370+ run : but --version | grep "but $LATEST_NIGHTLY_VERSION"
371+
337372 validate-installer :
338373 needs :
339374 - build-installer
0 commit comments