You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-07-20 22:03:28 +07:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
3e891b0cb6 | |||
2e0b25913c | |||
29640e4139 | |||
cbeba61921 | |||
344ba5f715 | |||
9be03d3dab | |||
dbebe359e4 |
20
.github/workflows/publish-immutable-actions.yml
vendored
Normal file
20
.github/workflows/publish-immutable-actions.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: 'Publish Immutable Action Version'
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checking out
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
id: publish
|
||||
uses: actions/publish-immutable-action@0.0.3
|
2
.licenses/npm/fast-xml-parser.dep.yml
generated
2
.licenses/npm/fast-xml-parser.dep.yml
generated
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: fast-xml-parser
|
||||
version: 4.3.6
|
||||
version: 4.4.1
|
||||
type: npm
|
||||
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
|
||||
homepage:
|
||||
|
9
dist/cache-save/index.js
vendored
9
dist/cache-save/index.js
vendored
@ -81174,11 +81174,14 @@ function isCacheFeatureAvailable() {
|
||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||
/**
|
||||
* Returns this action runs on GitHub Enterprise Server or not.
|
||||
* (port from https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/cache/src/internal/cacheUtils.ts#L134)
|
||||
*/
|
||||
function isGhes() {
|
||||
const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||
return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM';
|
||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
|
||||
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
||||
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
||||
}
|
||||
|
||||
|
||||
|
38
dist/setup/index.js
vendored
38
dist/setup/index.js
vendored
@ -51639,6 +51639,8 @@ exports.validate = function (xmlData, options) {
|
||||
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
|
||||
} else if (attrStr.trim().length > 0) {
|
||||
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
|
||||
} else if (tags.length === 0) {
|
||||
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos));
|
||||
} else {
|
||||
const otg = tags.pop();
|
||||
if (tagName !== otg.tagName) {
|
||||
@ -52082,6 +52084,7 @@ Builder.prototype.j2x = function(jObj, level) {
|
||||
//repeated nodes
|
||||
const arrLen = jObj[key].length;
|
||||
let listTagVal = "";
|
||||
let listTagAttr = "";
|
||||
for (let j = 0; j < arrLen; j++) {
|
||||
const item = jObj[key][j];
|
||||
if (typeof item === 'undefined') {
|
||||
@ -52091,17 +52094,27 @@ Builder.prototype.j2x = function(jObj, level) {
|
||||
else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
||||
// val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
||||
} else if (typeof item === 'object') {
|
||||
if(this.options.oneListGroup ){
|
||||
listTagVal += this.j2x(item, level + 1).val;
|
||||
if(this.options.oneListGroup){
|
||||
const result = this.j2x(item, level + 1);
|
||||
listTagVal += result.val;
|
||||
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
|
||||
listTagAttr += result.attrStr
|
||||
}
|
||||
}else{
|
||||
listTagVal += this.processTextOrObjNode(item, key, level)
|
||||
}
|
||||
} else {
|
||||
listTagVal += this.buildTextValNode(item, key, '', level);
|
||||
if (this.options.oneListGroup) {
|
||||
let textValue = this.options.tagValueProcessor(key, item);
|
||||
textValue = this.replaceEntitiesValue(textValue);
|
||||
listTagVal += textValue;
|
||||
} else {
|
||||
listTagVal += this.buildTextValNode(item, key, '', level);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.options.oneListGroup){
|
||||
listTagVal = this.buildObjectNode(listTagVal, key, '', level);
|
||||
listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
|
||||
}
|
||||
val += listTagVal;
|
||||
} else {
|
||||
@ -52911,10 +52924,18 @@ const parseXml = function(xmlData) {
|
||||
let tagContent = "";
|
||||
//self-closing tag
|
||||
if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){
|
||||
if(tagName[tagName.length - 1] === "/"){ //remove trailing '/'
|
||||
tagName = tagName.substr(0, tagName.length - 1);
|
||||
jPath = jPath.substr(0, jPath.length - 1);
|
||||
tagExp = tagName;
|
||||
}else{
|
||||
tagExp = tagExp.substr(0, tagExp.length - 1);
|
||||
}
|
||||
i = result.closeIndex;
|
||||
}
|
||||
//unpaired tag
|
||||
else if(this.options.unpairedTags.indexOf(tagName) !== -1){
|
||||
|
||||
i = result.closeIndex;
|
||||
}
|
||||
//normal tag
|
||||
@ -93612,11 +93633,14 @@ function isCacheFeatureAvailable() {
|
||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
|
||||
/**
|
||||
* Returns this action runs on GitHub Enterprise Server or not.
|
||||
* (port from https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/cache/src/internal/cacheUtils.ts#L134)
|
||||
*/
|
||||
function isGhes() {
|
||||
const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||
return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM';
|
||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
|
||||
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
||||
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
||||
}
|
||||
|
||||
|
||||
|
45
externals/install-dotnet.sh
vendored
45
externals/install-dotnet.sh
vendored
@ -327,6 +327,14 @@ get_machine_architecture() {
|
||||
echo "loongarch64"
|
||||
return 0
|
||||
;;
|
||||
riscv64)
|
||||
echo "riscv64"
|
||||
return 0
|
||||
;;
|
||||
powerpc|ppc)
|
||||
echo "ppc"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -415,11 +423,17 @@ get_normalized_architecture_for_specific_sdk_version() {
|
||||
# args:
|
||||
# version or channel - $1
|
||||
is_arm64_supported() {
|
||||
#any channel or version that starts with the specified versions
|
||||
case "$1" in
|
||||
( "1"* | "2"* | "3"* | "4"* | "5"*)
|
||||
echo false
|
||||
return 0
|
||||
# Extract the major version by splitting on the dot
|
||||
major_version="${1%%.*}"
|
||||
|
||||
# Check if the major version is a valid number and less than 6
|
||||
case "$major_version" in
|
||||
[0-9]*)
|
||||
if [ "$major_version" -lt 6 ]; then
|
||||
echo false
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo true
|
||||
@ -953,15 +967,16 @@ copy_files_or_dirs_from_list() {
|
||||
local root_path="$(remove_trailing_slash "$1")"
|
||||
local out_path="$(remove_trailing_slash "$2")"
|
||||
local override="$3"
|
||||
local osname="$(get_current_os_name)"
|
||||
local override_switch=$(
|
||||
if [ "$override" = false ]; then
|
||||
if [ "$osname" = "linux-musl" ]; then
|
||||
printf -- "-u";
|
||||
else
|
||||
printf -- "-n";
|
||||
fi
|
||||
fi)
|
||||
local override_switch=""
|
||||
|
||||
if [ "$override" = false ]; then
|
||||
override_switch="-n"
|
||||
|
||||
# use -u instead of -n when it's available
|
||||
if cp -u --help >/dev/null 2>&1; then
|
||||
override_switch="-u"
|
||||
fi
|
||||
fi
|
||||
|
||||
cat | uniq | while read -r file_path; do
|
||||
local path="$(remove_beginning_slash "${file_path#$root_path}")"
|
||||
@ -1727,7 +1742,7 @@ do
|
||||
zip_path="$1"
|
||||
;;
|
||||
-?|--?|-h|--help|-[Hh]elp)
|
||||
script_name="$(basename "$0")"
|
||||
script_name="dotnet-install.sh"
|
||||
echo ".NET Tools Installer"
|
||||
echo "Usage:"
|
||||
echo " # Install a .NET SDK of a given Quality from a given Channel"
|
||||
|
8
package-lock.json
generated
8
package-lock.json
generated
@ -16,7 +16,7 @@
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/http-client": "^2.2.1",
|
||||
"@actions/io": "^1.0.2",
|
||||
"fast-xml-parser": "^4.3.6",
|
||||
"fast-xml-parser": "^4.4.1",
|
||||
"json5": "^2.2.3",
|
||||
"semver": "^7.6.0"
|
||||
},
|
||||
@ -3490,9 +3490,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-xml-parser": {
|
||||
"version": "4.3.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.6.tgz",
|
||||
"integrity": "sha512-M2SovcRxD4+vC493Uc2GZVcZaj66CCJhWurC4viynVSTvrpErCShNcDz1lAho6n9REQKvL/ll4A4/fw6Y9z8nw==",
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz",
|
||||
"integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
|
@ -33,7 +33,7 @@
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/http-client": "^2.2.1",
|
||||
"@actions/io": "^1.0.2",
|
||||
"fast-xml-parser": "^4.3.6",
|
||||
"fast-xml-parser": "^4.4.1",
|
||||
"json5": "^2.2.3",
|
||||
"semver": "^7.6.0"
|
||||
},
|
||||
|
@ -90,9 +90,16 @@ export function isCacheFeatureAvailable(): boolean {
|
||||
|
||||
/**
|
||||
* Returns this action runs on GitHub Enterprise Server or not.
|
||||
* (port from https://github.com/actions/toolkit/blob/457303960f03375db6f033e214b9f90d79c3fe5c/packages/cache/src/internal/cacheUtils.ts#L134)
|
||||
*/
|
||||
function isGhes(): boolean {
|
||||
const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||
return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM';
|
||||
const ghUrl = new URL(
|
||||
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
|
||||
);
|
||||
|
||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
|
||||
const isLocalHost = hostname.endsWith('.LOCALHOST');
|
||||
|
||||
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
||||
}
|
||||
|
Reference in New Issue
Block a user