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:
@@ -8,6 +8,10 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
ARTIFACTS_DIR: 2049ef39-42a2-46d2-b513-ee6d2e3a7b15
|
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
|
ARCHIVE_BASE_NAME: luacsforbarotrauma
|
||||||
# XXX: these file names are subject to shell expansion.
|
# XXX: these file names are subject to shell expansion.
|
||||||
# Be careful when using special characters.
|
# Be careful when using special characters.
|
||||||
@@ -19,6 +23,9 @@ env:
|
|||||||
Barotrauma.deps.json
|
Barotrauma.deps.json
|
||||||
Barotrauma.dll
|
Barotrauma.dll
|
||||||
Barotrauma.pdb
|
Barotrauma.pdb
|
||||||
|
DedicatedServer.deps.json
|
||||||
|
DedicatedServer.dll
|
||||||
|
DedicatedServer.pdb
|
||||||
ARCHIVE_FILES_SHARED: |
|
ARCHIVE_FILES_SHARED: |
|
||||||
0Harmony.dll
|
0Harmony.dll
|
||||||
Sigil.dll
|
Sigil.dll
|
||||||
@@ -53,7 +60,6 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v2
|
uses: actions/setup-dotnet@v2
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
3.1.x
|
|
||||||
6.0.x
|
6.0.x
|
||||||
|
|
||||||
- name: "Build: WindowsServer"
|
- name: "Build: WindowsServer"
|
||||||
@@ -77,28 +83,25 @@ jobs:
|
|||||||
shopt -s globstar nullglob
|
shopt -s globstar nullglob
|
||||||
shopt -u dotglob
|
shopt -u dotglob
|
||||||
|
|
||||||
IFS=$'\n' readarray -td $'\n' ARCHIVE_FILES_SHARED <<< "$ARCHIVE_FILES_SHARED"
|
# This converts a newline-separated (LF) list into a Bash array
|
||||||
IFS=$'\n' readarray -td $'\n' ARCHIVE_FILES_CLIENT <<< "$ARCHIVE_FILES_CLIENT"
|
# NOTE: this doesn't discard the trailing LF that GitHub actions
|
||||||
IFS=$'\n' readarray -td $'\n' ARCHIVE_FILES_SERVER <<< "$ARCHIVE_FILES_SERVER"
|
# append (which results in an extra entry in the array).
|
||||||
|
lines_to_array() {
|
||||||
|
IFS=$'\n' readarray -td $'\n' "$1" <<< "${!1}"
|
||||||
|
}
|
||||||
|
|
||||||
platforms=(
|
lines_to_array ARCHIVE_FILES_SHARED
|
||||||
"windows"
|
lines_to_array ARCHIVE_FILES_CLIENT
|
||||||
"linux"
|
lines_to_array ARCHIVE_FILES_SERVER
|
||||||
"mac"
|
lines_to_array RELEASES
|
||||||
)
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
mkdir -p "$ARTIFACTS_DIR"
|
mkdir -p "$ARTIFACTS_DIR"
|
||||||
artifacts_dir="$(realpath "$ARTIFACTS_DIR")"
|
artifacts_dir="$(realpath "$ARTIFACTS_DIR")"
|
||||||
|
|
||||||
for i in "${!platforms[@]}"; do
|
for i in "${!RELEASES[@]}"; do
|
||||||
|
[[ -z "${RELEASES[i]}" ]] && continue
|
||||||
(
|
(
|
||||||
platform="${platforms[i]}"
|
IFS=':' read platform publish_dir _rest <<< "${RELEASES[i]}"
|
||||||
publish_dir="${publish_dirs[i]}"
|
|
||||||
cd "$publish_dir"
|
cd "$publish_dir"
|
||||||
echo "Creating build_${platform}.zip"
|
echo "Creating build_${platform}.zip"
|
||||||
zip -qr "${artifacts_dir}/${ARCHIVE_BASE_NAME}_build_${platform}.zip" *
|
zip -qr "${artifacts_dir}/${ARCHIVE_BASE_NAME}_build_${platform}.zip" *
|
||||||
@@ -113,10 +116,10 @@ jobs:
|
|||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in "${!platforms[@]}"; do
|
for i in "${!RELEASES[@]}"; do
|
||||||
|
[[ -z "${RELEASES[i]}" ]] && continue
|
||||||
(
|
(
|
||||||
platform="${platforms[i]}"
|
IFS=':' read platform publish_dir _rest <<< "${RELEASES[i]}"
|
||||||
publish_dir="${publish_dirs[i]}"
|
|
||||||
cd "$publish_dir"
|
cd "$publish_dir"
|
||||||
echo "Creating build_${platform}.tar.gz"
|
echo "Creating build_${platform}.tar.gz"
|
||||||
tar -czf "${artifacts_dir}/${ARCHIVE_BASE_NAME}_build_${platform}.tar.gz" \
|
tar -czf "${artifacts_dir}/${ARCHIVE_BASE_NAME}_build_${platform}.tar.gz" \
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v2
|
uses: actions/setup-dotnet@v2
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
3.1.x
|
|
||||||
6.0.x
|
6.0.x
|
||||||
|
|
||||||
- name: Initialize environment
|
- name: Initialize environment
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v2
|
uses: actions/setup-dotnet@v2
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
3.1.x
|
|
||||||
6.0.x
|
6.0.x
|
||||||
|
|
||||||
- uses: leafo/gh-actions-lua@v8
|
- uses: leafo/gh-actions-lua@v8
|
||||||
|
|||||||
Reference in New Issue
Block a user