Skip to content

Commit 8b5d440

Browse files
authored
15.0 (#378)
1 parent faebfc9 commit 8b5d440

287 files changed

Lines changed: 6419 additions & 6780 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ blank_issues_enabled: false
22
contact_links:
33
- name: Telegram
44
url: https://t.me/customskinloader
5-
about: Gugugu
6-
- name: QQ
5+
about: Community chat for CustomSkinLoader users.
6+
- name: QQ Group
77
url: https://jq.qq.com/?_wv=1027&k=vF16R5tg
8-
about: Gugugu
8+
about: Chinese community chat for CustomSkinLoader users.

.github/scripts/build.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
param(
2+
[string] $GradleCommand = "./gradlew.bat"
3+
)
4+
5+
$ErrorActionPreference = "Stop"
6+
Set-StrictMode -Version Latest
7+
8+
$ScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
9+
$RepositoryRoot = (Resolve-Path -LiteralPath (Join-Path $ScriptRoot "../..")).Path
10+
Set-Location -LiteralPath $RepositoryRoot
11+
12+
& $GradleCommand clean build --stacktrace
13+
if ($LASTEXITCODE -ne 0) {
14+
throw "Gradle build failed with exit code $LASTEXITCODE."
15+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
$ErrorActionPreference = "Stop"
2+
Set-StrictMode -Version Latest
3+
4+
$RunnerTemp = if ([string]::IsNullOrWhiteSpace($env:RUNNER_TEMP)) {
5+
[System.IO.Path]::GetTempPath()
6+
} else {
7+
$env:RUNNER_TEMP
8+
}
9+
10+
function Add-ActionPath {
11+
param([Parameter(Mandatory = $true)][string] $Path)
12+
13+
$env:Path = "$Path;$env:Path"
14+
if (-not [string]::IsNullOrWhiteSpace($env:GITHUB_PATH)) {
15+
Add-Content -LiteralPath $env:GITHUB_PATH -Value $Path
16+
}
17+
}
18+
19+
if (-not (Get-Command aws -ErrorAction SilentlyContinue)) {
20+
$installer = Join-Path $RunnerTemp "AWSCLIV2.msi"
21+
Invoke-WebRequest -Uri "https://awscli.amazonaws.com/AWSCLIV2.msi" -OutFile $installer
22+
$install = Start-Process msiexec.exe -Wait -PassThru -ArgumentList "/i `"$installer`" /qn"
23+
if ($install.ExitCode -ne 0) {
24+
throw "AWS CLI installer failed with exit code $($install.ExitCode)."
25+
}
26+
27+
$awsCliDir = Join-Path $env:ProgramFiles "Amazon/AWSCLIV2"
28+
$machinePath = [System.Environment]::GetEnvironmentVariable("Path", "Machine")
29+
$userPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
30+
$env:Path = "$awsCliDir;$machinePath;$userPath;$env:Path"
31+
if (-not [string]::IsNullOrWhiteSpace($env:GITHUB_PATH)) {
32+
Add-Content -LiteralPath $env:GITHUB_PATH -Value $awsCliDir
33+
}
34+
}
35+
36+
if (-not (Get-Command coscli -ErrorAction SilentlyContinue)) {
37+
$coscliDir = Join-Path $RunnerTemp "coscli"
38+
New-Item -ItemType Directory -Force -Path $coscliDir | Out-Null
39+
Invoke-WebRequest -Uri "https://github.com/tencentyun/coscli/releases/download/v1.0.8/coscli-v1.0.8-windows-amd64.exe" -OutFile (Join-Path $coscliDir "coscli.exe")
40+
Add-ActionPath $coscliDir
41+
}
42+
43+
if (-not (Get-Command tccli -ErrorAction SilentlyContinue)) {
44+
python -m pip install --user tccli
45+
if ($LASTEXITCODE -ne 0) {
46+
throw "tccli install failed with exit code $LASTEXITCODE."
47+
}
48+
49+
$pythonUserScripts = Join-Path (python -m site --user-base) "Scripts"
50+
Add-ActionPath $pythonUserScripts
51+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
param(
2+
[string] $SourcePath = "Bootstrap/build/libs",
3+
[string] $DestinationPath = "build/publish"
4+
)
5+
6+
$ErrorActionPreference = "Stop"
7+
Set-StrictMode -Version Latest
8+
9+
$ScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
10+
$RepositoryRoot = (Resolve-Path -LiteralPath (Join-Path $ScriptRoot "../..")).Path
11+
Set-Location -LiteralPath $RepositoryRoot
12+
13+
function Resolve-RepoPath {
14+
param([Parameter(Mandatory = $true)][string] $Path)
15+
16+
if ([System.IO.Path]::IsPathRooted($Path)) {
17+
return [System.IO.Path]::GetFullPath($Path)
18+
}
19+
20+
return [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($RepositoryRoot, $Path))
21+
}
22+
23+
$source = Resolve-RepoPath $SourcePath
24+
$destination = Resolve-RepoPath $DestinationPath
25+
26+
New-Item -ItemType Directory -Force -Path $destination | Out-Null
27+
28+
$jars = Get-ChildItem -LiteralPath $source -Filter "CustomSkinLoader_Universal-*.jar" -File |
29+
Where-Object { $_.Name -notlike "*-sources.jar" }
30+
31+
if (-not $jars) {
32+
throw "No Universal jar found under $SourcePath."
33+
}
34+
35+
$jars | Copy-Item -Destination $destination -Force
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
param(
2+
[string] $Channel = $env:PUBLISH_CHANNEL,
3+
[string] $LatestJsonName = $env:LATEST_JSON_NAME,
4+
[string] $DetailJsonName = $env:DETAIL_JSON_NAME
5+
)
6+
7+
$ErrorActionPreference = "Stop"
8+
Set-StrictMode -Version Latest
9+
10+
if ([string]::IsNullOrWhiteSpace($Channel)) {
11+
$Channel = "Beta"
12+
}
13+
14+
$publishScript = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) "publish-artifacts.ps1"
15+
$arguments = @("-Channel", $Channel)
16+
17+
if (-not [string]::IsNullOrWhiteSpace($LatestJsonName)) {
18+
$arguments += @("-LatestJsonName", $LatestJsonName)
19+
}
20+
21+
if (-not [string]::IsNullOrWhiteSpace($DetailJsonName)) {
22+
$arguments += @("-DetailJsonName", $DetailJsonName)
23+
}
24+
25+
& $publishScript @arguments

0 commit comments

Comments
 (0)