Skip to content

Commit

Permalink
Add feature of prefering already installed versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolai-laevskii committed Sep 4, 2023
1 parent faa2990 commit e4db8cc
Show file tree
Hide file tree
Showing 7 changed files with 407 additions and 227 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,25 @@ jobs:
shell: pwsh
run: |
__tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.dotnet-version }}"
setup-versions-prefer-installed:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet ${{ matrix.dotnet-version }}
uses: ./
with:
dotnet-version: ${{ matrix.dotnet-version }}
prefer-installed: true
- name: Verify installed version
shell: pwsh
run: |
__tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.dotnet-version }}"
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx'
dotnet-quality:
description: 'Optional quality of the build. The possible values are: daily, signed, validated, preview, ga.'
prefer-installed:
description: 'Optional flag to prefer an already installed version of the SDK (when partial version syntax is used). If not provided, latest version with specified quality will be installed.'
required: false
default: false
global-json-file:
description: 'Optional global.json location, if your global.json isn''t located in the root of the repo.'
source-url:
Expand Down
Loading

0 comments on commit e4db8cc

Please sign in to comment.