Skip to content

Commit

Permalink
decouple install from path update
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Oct 24, 2024
1 parent 8c78e03 commit 17e95b6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,26 @@ runs:
if: ${{ steps.cache-shorebird.outputs.cache-hit != 'true' && runner.os != 'Windows' }}
run: |
curl --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/shorebirdtech/install/main/install.sh -sSf | bash -s -- --force
install_path=${{ env.install_path }}
echo $install_path/bin >> $GITHUB_PATH
echo "added $install_path/bin to GITHUB_PATH"
shell: bash

- name: 🐦 Install Shorebird (Windows)
if: ${{ steps.cache-shorebird.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
run: |
Set-ExecutionPolicy RemoteSigned -scope CurrentUser # Needed to execute remote scripts
iwr -UseBasicParsing 'https://raw.githubusercontent.com/shorebirdtech/install/main/install.ps1'|iex
shell: pwsh

- name: ➕ Add Shorebird to Path (MacOS / Linux)
if: ${{ runner.os != 'Windows' }}
run: |
install_path=${{ env.install_path }}
echo $install_path/bin >> $GITHUB_PATH
echo "added $install_path/bin to GITHUB_PATH"
shell: bash

- name: ➕ Add Shorebird to Path (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
$installDirectory = ${{ env.install_path }}
Add-Content $env:GITHUB_PATH "$installDirectory\bin"
Write-Output "added $installDirectory\bin to GITHUB_PATH"
Expand Down

0 comments on commit 17e95b6

Please sign in to comment.