Merge pull request #127 from notpeelz/add-server-files-to-ci-client-patch
Simplify CI publish-release script Remove dotnet 3.1 from CI dependencies Add server files to CI client patch archives
This commit is contained in:
43
.github/workflows/publish-release.yml
vendored
43
.github/workflows/publish-release.yml
vendored
@@ -8,6 +8,10 @@ on:
|
||||
|
||||
env:
|
||||
ARTIFACTS_DIR: 2049ef39-42a2-46d2-b513-ee6d2e3a7b15
|
||||
RELEASES: |
|
||||
windows:Barotrauma/bin/ReleaseWindows/net6.0/win-x64/publish
|
||||
linux:Barotrauma/bin/ReleaseLinux/net6.0/linux-x64/publish
|
||||
mac:Barotrauma/bin/ReleaseMac/net6.0/osx-x64/publish
|
||||
ARCHIVE_BASE_NAME: luacsforbarotrauma
|
||||
# XXX: these file names are subject to shell expansion.
|
||||
# Be careful when using special characters.
|
||||
@@ -19,6 +23,9 @@ env:
|
||||
Barotrauma.deps.json
|
||||
Barotrauma.dll
|
||||
Barotrauma.pdb
|
||||
DedicatedServer.deps.json
|
||||
DedicatedServer.dll
|
||||
DedicatedServer.pdb
|
||||
ARCHIVE_FILES_SHARED: |
|
||||
0Harmony.dll
|
||||
Sigil.dll
|
||||
@@ -53,7 +60,6 @@ jobs:
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: |
|
||||
3.1.x
|
||||
6.0.x
|
||||
|
||||
- name: "Build: WindowsServer"
|
||||
@@ -77,28 +83,25 @@ jobs:
|
||||
shopt -s globstar nullglob
|
||||
shopt -u dotglob
|
||||
|
||||
IFS=$'\n' readarray -td $'\n' ARCHIVE_FILES_SHARED <<< "$ARCHIVE_FILES_SHARED"
|
||||
IFS=$'\n' readarray -td $'\n' ARCHIVE_FILES_CLIENT <<< "$ARCHIVE_FILES_CLIENT"
|
||||
IFS=$'\n' readarray -td $'\n' ARCHIVE_FILES_SERVER <<< "$ARCHIVE_FILES_SERVER"
|
||||
# This converts a newline-separated (LF) list into a Bash array
|
||||
# NOTE: this doesn't discard the trailing LF that GitHub actions
|
||||
# append (which results in an extra entry in the array).
|
||||
lines_to_array() {
|
||||
IFS=$'\n' readarray -td $'\n' "$1" <<< "${!1}"
|
||||
}
|
||||
|
||||
platforms=(
|
||||
"windows"
|
||||
"linux"
|
||||
"mac"
|
||||
)
|
||||
publish_dirs=(
|
||||
"Barotrauma/bin/ReleaseWindows/net6.0/win-x64/publish"
|
||||
"Barotrauma/bin/ReleaseLinux/net6.0/linux-x64/publish"
|
||||
"Barotrauma/bin/ReleaseMac/net6.0/osx-x64/publish"
|
||||
)
|
||||
lines_to_array ARCHIVE_FILES_SHARED
|
||||
lines_to_array ARCHIVE_FILES_CLIENT
|
||||
lines_to_array ARCHIVE_FILES_SERVER
|
||||
lines_to_array RELEASES
|
||||
|
||||
mkdir -p "$ARTIFACTS_DIR"
|
||||
artifacts_dir="$(realpath "$ARTIFACTS_DIR")"
|
||||
|
||||
for i in "${!platforms[@]}"; do
|
||||
for i in "${!RELEASES[@]}"; do
|
||||
[[ -z "${RELEASES[i]}" ]] && continue
|
||||
(
|
||||
platform="${platforms[i]}"
|
||||
publish_dir="${publish_dirs[i]}"
|
||||
IFS=':' read platform publish_dir _rest <<< "${RELEASES[i]}"
|
||||
cd "$publish_dir"
|
||||
echo "Creating build_${platform}.zip"
|
||||
zip -qr "${artifacts_dir}/${ARCHIVE_BASE_NAME}_build_${platform}.zip" *
|
||||
@@ -113,10 +116,10 @@ jobs:
|
||||
)
|
||||
done
|
||||
|
||||
for i in "${!platforms[@]}"; do
|
||||
for i in "${!RELEASES[@]}"; do
|
||||
[[ -z "${RELEASES[i]}" ]] && continue
|
||||
(
|
||||
platform="${platforms[i]}"
|
||||
publish_dir="${publish_dirs[i]}"
|
||||
IFS=':' read platform publish_dir _rest <<< "${RELEASES[i]}"
|
||||
cd "$publish_dir"
|
||||
echo "Creating build_${platform}.tar.gz"
|
||||
tar -czf "${artifacts_dir}/${ARCHIVE_BASE_NAME}_build_${platform}.tar.gz" \
|
||||
|
||||
1
.github/workflows/run-tests.yml
vendored
1
.github/workflows/run-tests.yml
vendored
@@ -24,7 +24,6 @@ jobs:
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: |
|
||||
3.1.x
|
||||
6.0.x
|
||||
|
||||
- name: Initialize environment
|
||||
|
||||
1
.github/workflows/update-docs.yml
vendored
1
.github/workflows/update-docs.yml
vendored
@@ -25,7 +25,6 @@ jobs:
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: |
|
||||
3.1.x
|
||||
6.0.x
|
||||
|
||||
- uses: leafo/gh-actions-lua@v8
|
||||
|
||||
Reference in New Issue
Block a user