Compare commits

..

1 Commits

Author SHA1 Message Date
Aparna Jyothi
813cb4b067 new cdn updates 2024-12-24 18:49:41 +05:30
61 changed files with 7953 additions and 20777 deletions

View File

@@ -1,22 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'weekly'
# Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions'
# Workflow files stored in the default location of `.github/workflows`
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
directory: '/'
schedule:
interval: 'weekly'

View File

@@ -16,4 +16,4 @@ jobs:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '24'
node-version: '20'

View File

@@ -16,4 +16,4 @@ jobs:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '24'
node-version: '20'

View File

@@ -17,23 +17,24 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.427, 7.0.410 and 7.0.x
- name: Setup dotnet 2.2.402, 3.1.404 and 3.0.x
uses: ./
with:
dotnet-version: |
6.0.427
7.0.410
7.0.x
2.2.402
3.1.404
3.0.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0.427$", "^7.0.410$", "^7.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2.402$", "^3.1.404$", "^3.0"
test-setup-multiple-versions-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -42,48 +43,50 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 8.0.403, 9.0.301 and 8.0.x
- name: Setup dotnet 6.0.427, 8.0.403 and 8.0.x
uses: ./
with:
dotnet-version: |
6.0.427
8.0.403
9.0.301
8.0.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.403$", "^9.0.301$", "^8.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0.427$", "^8.0.403$", "^8.0"
test-setup-full-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 6.0 and 7.0 used for the test project
- name: Setup dotnet 6.0.427
# Side-by-side install of 2.2 and 3.1 used for the test project
- name: Setup dotnet 2.2.402
uses: ./
with:
dotnet-version: 6.0.427
- name: Setup dotnet 7.0.410
dotnet-version: 2.2.402
- name: Setup dotnet 3.1.201
uses: ./
with:
dotnet-version: 7.0.410
dotnet-version: 3.1.201
# We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^7.0.410$", "^6.0.427$" -CheckNugetConfig
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$", "^2.2.402$" -CheckNugetConfig
test-setup-full-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -92,50 +95,52 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 8.0 and 9.0 used for the test project
# Side-by-side install of 6.0 and 8.0 used for the test project
- name: Setup dotnet 6.0.427
uses: ./
with:
dotnet-version: 6.0.427
- name: Setup dotnet 8.0.402
uses: ./
with:
dotnet-version: 8.0.402
- name: Setup dotnet 9.0.301
uses: ./
with:
dotnet-version: 9.0.301
# We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^9.0.301$", "^8.0.402$" -CheckNugetConfig
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.402$", "^6.0.427$" -CheckNugetConfig
test-setup-without-patch-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 6.0, 7.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '6.0'
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '3.1'
uses: ./
with:
dotnet-version: '6.0'
- name: Setup dotnet '7.0'
dotnet-version: '3.1'
- name: Setup dotnet '2.2'
uses: ./
with:
dotnet-version: '7.0'
dotnet-version: '2.2'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2"
test-setup-without-patch-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -144,41 +149,42 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 8.0, 9.0 needs to be in single quotes to interpret as a string instead of as an integer
# 6.0, 7.0, 8.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '8.0'
uses: ./
with:
dotnet-version: '8.0'
- name: Setup dotnet '9.0'
- name: Setup dotnet '6.0'
uses: ./
with:
dotnet-version: '9.0'
dotnet-version: '6.0'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^6.0"
test-setup-prerelease-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet '6.0.100-preview.7.21379.14'
- name: Setup dotnet '3.1.100-preview1-014459'
uses: ./
with:
dotnet-version: '6.0.100-preview.7.21379.14'
dotnet-version: '3.1.100-preview1-014459'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "6.0.100-preview.7.21379.14"
run: __tests__/verify-dotnet.ps1 -Patterns "3.1.100-preview1-014459"
test-setup-prerelease-version-extended:
runs-on: ${{ matrix.operating-system }}
@@ -188,7 +194,7 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -205,24 +211,25 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.x
- name: Setup dotnet 3.1.x
uses: ./
with:
dotnet-version: 6.0.x
- name: Setup dotnet 7.0.X
dotnet-version: 3.1.x
- name: Setup dotnet 2.2.X
uses: ./
with:
dotnet-version: 7.0.X
dotnet-version: 2.2.X
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
test-setup-latest-patch-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -231,7 +238,7 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -239,13 +246,13 @@ jobs:
uses: ./
with:
dotnet-version: 8.0.x
- name: Setup dotnet 9.0.X
- name: Setup dotnet 6.0.X
uses: ./
with:
dotnet-version: 9.0.X
dotnet-version: 6.0.X
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
test-ABCxx-syntax:
runs-on: ${{ matrix.operating-system }}
@@ -253,10 +260,10 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
[ubuntu-latest, windows-latest, macos-13, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -274,24 +281,25 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.*
- name: Setup dotnet 3.1.*
uses: ./
with:
dotnet-version: 6.0.*
- name: Setup dotnet 7.0.*
dotnet-version: 3.1.*
- name: Setup dotnet 2.2.*
uses: ./
with:
dotnet-version: 7.0.*
dotnet-version: 2.2.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2"
test-setup-with-wildcard-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -300,7 +308,7 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -308,23 +316,23 @@ jobs:
uses: ./
with:
dotnet-version: 8.0.*
- name: Setup dotnet 9.0.*
- name: Setup dotnet 6.0.*
uses: ./
with:
dotnet-version: 9.0.*
dotnet-version: 6.0.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^6.0"
test-setup-global-json-specified-and-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -332,15 +340,16 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "6.0.424","rollForward": "latestFeature"}}' > ./subdirectory/global.json
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
dotnet-version: 7.0
dotnet-version: 3.1
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
test-setup-global-json-specified-and-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@@ -349,33 +358,7 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "8.0.402","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
dotnet-version: '9.0'
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
test-setup-global-json-only:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -387,10 +370,36 @@ jobs:
- name: Setup dotnet
uses: ./
with:
dotnet-version: '8.0'
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
test-setup-global-json-only:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2"
test-setup-global-json-only-extended:
runs-on: ${{ matrix.operating-system }}
@@ -400,7 +409,7 @@ jobs:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -422,10 +431,35 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "2.2.207","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2"
test-global-json-with-comments-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -442,41 +476,16 @@ jobs:
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
test-global-json-with-comments-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Write global.json
shell: bash
run: |
mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "8.0.402","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0"
test-setup-with-dotnet-quality:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
[ubuntu-latest, windows-latest, macos-13, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -495,23 +504,23 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Copy NuGet lock file to root
shell: bash
run: cp ./__tests__/e2e-test-csproj/packages.lock.json ./packages.lock.json
- name: Setup .NET Core 6.0
- name: Setup .NET Core 3.1
id: setup-dotnet
uses: ./
with:
dotnet-version: 6.0
dotnet-version: 3.1
cache: true
- name: Verify Cache
if: steps.setup-dotnet.outputs.cache-hit == 'true'
@@ -519,7 +528,7 @@ jobs:
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1"
test-setup-with-cache-extended:
runs-on: ${{ matrix.operating-system }}
@@ -531,7 +540,7 @@ jobs:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -557,20 +566,20 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
operating-system: [ubuntu-22.04, windows-latest, macos-13]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup .NET Core 6.0
- name: Setup .NET Core 3.1
id: setup-dotnet
uses: ./
with:
dotnet-version: 6.0
dotnet-version: 3.1
cache: true
cache-dependency-path: './__tests__/e2e-test-csproj/packages.lock.json'
- name: Verify Cache
@@ -579,7 +588,7 @@ jobs:
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1"
test-setup-with-cache-dependency-path-extended:
runs-on: ${{ matrix.operating-system }}
@@ -591,7 +600,7 @@ jobs:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -616,19 +625,19 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
[ubuntu-latest, windows-latest, macos-13, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 8.0.402
- name: Setup dotnet 6.0.401
uses: ./
id: step1
with:
dotnet-version: '8.0.402'
dotnet-version: '6.0.401'
- name: Verify value of the dotnet-version output
shell: pwsh
@@ -643,27 +652,27 @@ jobs:
fail-fast: false
matrix:
operating-system:
[ubuntu-latest, windows-latest, macos-15-intel, macos-latest]
[ubuntu-latest, windows-latest, macos-13, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 8.0.402, 6.0.401, 7.0.100-rc.1.22431.12
- name: Setup dotnet 6.0.401, 5.0.408, 7.0.100-rc.1.22431.12
uses: ./
id: step2
with:
dotnet-version: |
8.0.402
6.0.401
7.0.100-rc.1.22431.12
6.0.401
5.0.408
- name: Verify value of the dotnet-version output
shell: pwsh
run: |
$version = "8.0.402"
$version = "7.0.100-rc.1.22431.12"
if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" }
test-proxy:
@@ -681,7 +690,7 @@ jobs:
http_proxy: http://squid-proxy:3128
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Install Powershell
run: |
apt-get update
@@ -694,48 +703,48 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 8.0
- name: Setup dotnet 6.0
uses: ./
with:
dotnet-version: 8.0
dotnet-version: 6.0
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: |
__tests__/verify-dotnet.ps1 -Patterns "^8.0" -CheckNugetConfig
__tests__/verify-dotnet.ps1 -Patterns "^6.0" -CheckNugetConfig
test-bypass-proxy:
runs-on: ubuntu-22.04
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 7.0.410
- name: Setup dotnet 3.1.201
uses: ./
with:
dotnet-version: 7.0.410
dotnet-version: 3.1.201
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^7.0.410$" -CheckNugetConfig
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$" -CheckNugetConfig
test-bypass-proxy-extended:
runs-on: ubuntu-latest
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -755,12 +764,12 @@ jobs:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-15-intel]
lower-version: ['6.0.427']
operating-system: [ubuntu-22.04, windows-latest, macos-13]
lower-version: ['3.1.426']
higher-version: ['7.0.203']
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
@@ -779,17 +788,18 @@ jobs:
- name: Verify dotnet (higher version)
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.lower-version }}$", "^${{ matrix.higher-version }}$"
test-sequential-version-installation-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
lower-version: ['8.0.403']
higher-version: ['9.0.301']
lower-version: ['6.0.425']
higher-version: ['8.0.403']
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checking out
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Publish
id: publish
uses: actions/publish-immutable-action@v0.0.4
uses: actions/publish-immutable-action@0.0.3

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag
uses: actions/publish-action@v0.4.0
uses: actions/publish-action@v0.3.0
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -18,17 +18,32 @@ jobs:
fail-fast: false
matrix:
operating-system:
[
ubuntu-latest,
ubuntu-22.04,
windows-latest,
macos-15-intel,
macos-latest
]
dotnet-version: ['6.0', '7.0', '8.0', '9.0']
[ubuntu-latest, ubuntu-22.04, windows-latest, macos-13, macos-latest]
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0']
exclude:
- dotnet-version: '2.1'
operating-system: ubuntu-latest
- dotnet-version: '2.2'
operating-system: ubuntu-latest
- dotnet-version: '3.0'
operating-system: ubuntu-latest
- dotnet-version: '3.1'
operating-system: ubuntu-latest
- dotnet-version: '5.0'
operating-system: ubuntu-latest
- dotnet-version: '2.1'
operating-system: macos-latest
- dotnet-version: '2.2'
operating-system: macos-latest
- dotnet-version: '3.0'
operating-system: macos-latest
- dotnet-version: '3.1'
operating-system: macos-latest
- dotnet-version: '5.0'
operating-system: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

116
README.md
View File

@@ -15,13 +15,6 @@ documentation:
[Software installed on github hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software)
for .NET SDK versions that are currently available.
## Breaking changes in V5
- Upgraded action from node20 to node24
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. see [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
For more details, see the full release notes on the [release page](https://github.com/actions/setup-dotnet/releases/tag/v5.0.0)
## Usage
See [action.yml](action.yml)
@@ -29,10 +22,10 @@ See [action.yml](action.yml)
**Basic**:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '3.1.x'
- run: dotnet build <my project>
```
> **Warning**: Unless a concrete version is specified in the [`global.json`](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) file, **_the latest .NET version installed on the runner (including preinstalled versions) will be used [by default](https://learn.microsoft.com/en-us/dotnet/core/versions/selection#the-sdk-uses-the-latest-installed-version)_**. Please refer to the [documentation](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-software) for the currently preinstalled .NET SDK versions.
@@ -40,13 +33,13 @@ steps:
**Multiple version installation**:
```yml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
3.1.x
5.0.x
- run: dotnet build <my project>
```
## Supported version syntax
@@ -54,9 +47,9 @@ steps:
The `dotnet-version` input supports following syntax:
- **A.B.C** (e.g 6.0.400, 7.0.100-preview.7.22377.5) - installs exact version of .NET SDK
- **A.B** or **A.B.x** (e.g. 8.0, 8.0.x) - installs the latest patch version of .NET SDK on the channel `8.0`, including prerelease versions (preview, rc)
- **A** or **A.x** (e.g. 8, 8.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
- **A.B.Cxx** (e.g. 8.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).
- **A.B** or **A.B.x** (e.g. 3.1, 3.1.x) - installs the latest patch version of .NET SDK on the channel `3.1`, including prerelease versions (preview, rc)
- **A** or **A.x** (e.g. 3, 3.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
- **A.B.Cxx** (e.g. 6.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).
## Using the `dotnet-quality` input
@@ -66,10 +59,10 @@ This input sets up the action to install the latest build of the specified quali
```yml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '6.0.x'
dotnet-quality: 'preview'
- run: dotnet build <my project>
```
@@ -81,8 +74,8 @@ steps:
```yml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
global-json-file: csharp/global.json
- run: dotnet build <my project>
@@ -98,10 +91,10 @@ The action searches for [NuGet Lock files](https://learn.microsoft.com/nuget/con
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 6.x
cache: true
- run: dotnet restore --locked-mode
```
@@ -123,10 +116,10 @@ steps:
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 6.x
cache: true
- run: dotnet restore --locked-mode
```
@@ -137,10 +130,10 @@ steps:
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 6.x
cache: true
cache-dependency-path: subdir/packages.lock.json
- run: dotnet restore --locked-mode
@@ -154,12 +147,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '7.0.x', '8.0.x', '9.0.x' ]
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Execute dotnet
@@ -174,12 +167,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '7.0.x', '8.0.x', '9.0.x' ]
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: ${{ matrix.dotnet }}
@@ -193,10 +186,10 @@ jobs:
### Github Package Registry (GPR)
```yml
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '3.1.x'
source-url: https://nuget.pkg.github.com/<owner>/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -209,7 +202,7 @@ steps:
### Azure Artifacts
```yml
- uses: actions/setup-dotnet@v5
- uses: actions/setup-dotnet@v4
with:
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
env:
@@ -220,9 +213,9 @@ steps:
### nuget.org
```yml
- uses: actions/setup-dotnet@v5
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 3.1.x
- name: Publish the package to nuget.org
run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
@@ -243,11 +236,11 @@ Using the **dotnet-version** output it's possible to get the installed by the ac
In case of a single version installation, the `dotnet-version` output contains the version that is installed by the action.
```yaml
- uses: actions/setup-dotnet@v5
- uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: 8.0.402
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 8.0.402
dotnet-version: 3.1.422
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 3.1.422
```
**Multiple version installation**
@@ -255,27 +248,27 @@ In case of a single version installation, the `dotnet-version` output contains t
In case of a multiple version installation, the `dotnet-version` output contains the latest version that is installed by the action.
```yaml
- uses: actions/setup-dotnet@v5
- uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: |
8.0.402
9.0.301
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 9.0.301
3.1.422
5.0.408
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 5.0.408
```
**Installation from global.json**
When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`.
```yaml
- uses: actions/setup-dotnet@v5
- uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: |
8.0.402
9.0.301
global-json-file: "./global.json" # contains version 7.0.410
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 7.0.410
3.1.422
5.0.408
global-json-file: "./global.json" # contains version 2.2.207
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 2.2.207
```
### `cache-hit`
@@ -309,21 +302,12 @@ build:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@main
- uses: actions/setup-dotnet@v5
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '3.1.x'
cache: true
```
## Recommended permissions
When using the `setup-dotnet` action in your GitHub Actions workflow, it is recommended to set the following permissions to ensure proper functionality:
```yaml
permissions:
contents: read # access to check out code and install dependencies
```
## License
The scripts and documentation in this project are released under the [MIT License](LICENSE)

View File

@@ -72,7 +72,6 @@ $targetFrameworkVersionMap = @{
"6.0" = "net6.0";
"7.0" = "net7.0";
"8.0" = "net8.0";
"9.0" = "net9.0";
}
foreach ($version in $Versions)

View File

@@ -30,7 +30,7 @@ outputs:
dotnet-version:
description: 'Contains the installed by action .NET SDK version for reuse.'
runs:
using: 'node24'
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()

9137
dist/cache-save/index.js vendored

File diff suppressed because it is too large Load Diff

9824
dist/setup/index.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1362
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,9 @@
{
"name": "setup-dotnet",
"version": "5.0.0",
"version": "4.0.0",
"private": true,
"description": "setup dotnet action",
"main": "dist/setup/index.js",
"engines": {
"node": ">=24.0.0"
},
"scripts": {
"build": "ncc build -o dist/setup src/setup-dotnet.ts && ncc build -o dist/cache-save src/cache-save.ts",
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
@@ -29,12 +26,12 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^4.0.3",
"@actions/cache": "^3.2.4",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@actions/glob": "^0.5.0",
"@actions/http-client": "^2.2.3",
"@actions/glob": "^0.4.0",
"@actions/http-client": "^2.2.1",
"@actions/io": "^1.0.2",
"fast-xml-parser": "^4.4.1",
"json5": "^2.2.3",
@@ -42,22 +39,22 @@
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^24.1.0",
"@types/node": "^20.11.29",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^7.3.0",
"@typescript-eslint/parser": "^7.3.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-jest": "^29.0.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-node": "^11.1.0",
"husky": "^9.1.7",
"husky": "^8.0.1",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"jest-each": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.9.2",
"typescript": "^5.4.2",
"wget-improved": "^3.2.1"
},
"jest": {

View File

@@ -101,11 +101,9 @@ export class DotnetVersionResolver {
allowRetries: true,
maxRetries: 3
});
const response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexUrl
);
const result = response.result || {};
const releasesInfo: any[] = result['releases-index'];

View File

@@ -2,10 +2,10 @@
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [
"ES2022"
"es6"
],
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */