Skip to content

Commit

Permalink
Use PowerShell in latest Scarb version fetch step
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmis committed Jul 31, 2023
1 parent fab367c commit 6850f8d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:

- name: "Fetch latest Scarb version from GitHub releases"
id: version
shell: pwsh
run: |
LATEST_VERSION="$(curl -s https://github.com/software-mansion/scarb/releases/latest --head \
| grep location \
| sed -E "s/^.*v([0-9.-]+).*/\1/")"
echo "Latest Scarb version is v$LATEST_VERSION"
echo -n "LATEST_VERSION=$LATEST_VERSION" >> "$GITHUB_OUTPUT"
$location = (Invoke-WebRequest -Uri "https://github.com/software-mansion/scarb/releases/latest" -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction Ignore).Headers.Location
$latest_version = ($location -replace '^.*/v','')
echo "Latest Scarb version found is $latest_version"
echo "LATEST_VERSION=$latest_version" >> $env:GITHUB_OUTPUT
- name: "Setup Scarb without `scarb-version`"
uses: ./
Expand Down

0 comments on commit 6850f8d

Please sign in to comment.