Skip to content

Commit

Permalink
Fetch latest Scarb version and use it in CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmis committed Jul 27, 2023
1 parent a3a08ab commit d748861
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: "Fetch latest Scarb version from GitHub releases"
id: version
run: |
echo -n "LATEST_VERSION=$(curl -s https://github.com/software-mansion/scarb/releases/latest --head \
| grep location \
| sed -E "s/^.*v([0-9.-]+).*/\1/")" >> "$GITHUB_OUTPUT"
- name: "Setup Scarb without `scarb-version`"
uses: ./
- run: scarb --version
- run: scarb --version | grep "scarb ${{ steps.version.outputs.LATEST_VERSION }}"

- name: "Setup Scarb with `scarb-version: 0.4.1`"
uses: ./
Expand All @@ -35,7 +42,7 @@ jobs:
uses: ./
with:
scarb-version: latest
- run: scarb --version
- run: scarb --version | grep "scarb ${{ steps.version.outputs.LATEST_VERSION }}"

- name: "Create .tool-versions file"
run: echo "scarb 0.5.0" >> .tool-versions
Expand Down

0 comments on commit d748861

Please sign in to comment.