mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
feat(build): enhance license file packaging logic and add Rust toolchain setup in docs workflow
This commit is contained in:
parent
9914d26bdf
commit
67a2e753b3
2 changed files with 14 additions and 2 deletions
5
.github/workflows/docs.yml
vendored
5
.github/workflows/docs.yml
vendored
|
|
@ -25,6 +25,11 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
cache: true
|
||||
|
||||
- name: Cache mdbook
|
||||
id: cache-mdbook
|
||||
uses: actions/cache@v5
|
||||
|
|
|
|||
11
.github/workflows/release-build.yml
vendored
11
.github/workflows/release-build.yml
vendored
|
|
@ -110,7 +110,12 @@ jobs:
|
|||
BIN_PATH=target/$TARGET/release/$BIN$EXT
|
||||
mkdir -p dist
|
||||
ARCHIVE=$BIN-$TARGET.zip
|
||||
zip -9 "dist/$ARCHIVE" "$BIN_PATH" THIRDPARTY-LICENSES.html LICENSE* COPYING*
|
||||
files=("$BIN_PATH" THIRDPARTY-LICENSES.html)
|
||||
shopt -s nullglob
|
||||
license_files=(LICENSE* COPYING*)
|
||||
shopt -u nullglob
|
||||
files+=("${license_files[@]}")
|
||||
zip -9 "dist/$ARCHIVE" "${files[@]}"
|
||||
echo "ASSET=$ARCHIVE" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Package (Windows)
|
||||
|
|
@ -123,9 +128,11 @@ jobs:
|
|||
$BinPath = "target/$Target/release/$Bin$Ext"
|
||||
New-Item -ItemType Directory -Path dist -Force | Out-Null
|
||||
$Archive = "$Bin-$Target.zip"
|
||||
$LicenseFiles = @(Get-ChildItem -Path 'LICENSE*', 'COPYING*' -File -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName })
|
||||
$Files = @($BinPath, 'THIRDPARTY-LICENSES.html') + $LicenseFiles
|
||||
|
||||
Compress-Archive `
|
||||
-Path $BinPath, 'THIRDPARTY-LICENSES.html', 'LICENSE*', 'COPYING*' `
|
||||
-Path $Files `
|
||||
-DestinationPath "dist/$Archive" `
|
||||
-CompressionLevel Optimal
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue