diff --git a/.ci/make.sh b/.ci/make.sh
index b67b46f8701..f3d0e6c0ff1 100755
--- a/.ci/make.sh
+++ b/.ci/make.sh
@@ -11,6 +11,7 @@ repo=$(realpath "$script_path/../")
# shellcheck disable=SC1090
CMD=$1
TASK=$1
+TASK_ARGS=()
VERSION=$2
STACK_VERSION=$VERSION
set -euo pipefail
@@ -32,8 +33,14 @@ docker build --file .ci/DockerFile --tag elastic/elasticsearch-net .
echo -e "\033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
case $CMD in
+ clean)
+ echo -e "\033[36;1mRemoving $output_folder\033[0m"
+ TASK=clean
+ rm -rf "$output_folder"
+ ;;
assemble)
TASK=release
+ TASK_ARGS=("$VERSION" "$output_folder" "skiptests")
;;
*)
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
@@ -47,4 +54,4 @@ docker run \
--volume "${OUTPUT_DIR}:/sln/${output_folder}" \
--rm \
elastic/elasticsearch-net \
- ./build.sh $TASK "$VERSION" "$output_folder" "skiptests"
+ ./build.sh $TASK "${TASK_ARGS[@]}"
diff --git a/.github/workflows/unified-release.yml b/.github/workflows/unified-release.yml
new file mode 100644
index 00000000000..3e1a2a0257e
--- /dev/null
+++ b/.github/workflows/unified-release.yml
@@ -0,0 +1,37 @@
+name: Unified Release
+
+
+on:
+ pull_request:
+ paths-ignore:
+ - 'README.md'
+ - '.editorconfig'
+ push:
+ paths-ignore:
+ - 'README.md'
+ - '.editorconfig'
+ branches:
+ - main
+ - master
+ - '[0-9]+.[0-9]+'
+ - '[0-9]+.x'
+
+jobs:
+ assemble:
+ name: Assemble
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ stack_version: [ '8.0.0-SNAPSHOT']
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '5.0.100'
+
+ - run: "./.ci/make.sh assemble ${{ matrix.stack_version }}"
+ name: Assemble ${{ matrix.stack_version }}
+
diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs
index fc43a0b3a98..c36d1810b75 100644
--- a/build/scripts/Targets.fs
+++ b/build/scripts/Targets.fs
@@ -10,6 +10,7 @@ open System.IO
open Bullseye
open ProcNet
open Fake.Core
+open Fake.IO.Globbing.Operators
module Main =
@@ -60,7 +61,7 @@ module Main =
let canaryChain = [ "version"; "release"; "test-nuget-package";]
// the following are expected to be called as targets directly
- conditional "clean" parsed.ReleaseBuild <| fun _ -> Build.Clean parsed
+ conditional "clean" (parsed.ReleaseBuild || parsed.Target = "clean") <| fun _ -> Build.Clean parsed
target "version" <| fun _ -> printfn "Artifacts Version: %O" artifactsVersion
target "restore" Build.Restore
@@ -92,6 +93,10 @@ module Main =
printfn "Finished Release Build %O, artifacts available at: %s" artifactsVersion Paths.BuildOutput
| Some path ->
Fake.IO.Shell.cp_r Paths.BuildOutput path
+ let zipName = sprintf "elasticsearch-net-%O.zip" artifactsVersion.Full
+ let outputZip = Path.Combine(path, zipName)
+ let files = !! (sprintf "%s/*.*" path) -- outputZip
+ Fake.IO.Zip.createZip "." outputZip "elastic/elasticsearch-net artifact" 9 true files
printfn "Finished Release Build %O, output copied to: %s" artifactsVersion path
conditional "test-nuget-package" (not parsed.SkipTests) <| fun _ -> Tests.RunReleaseUnitTests artifactsVersion parsed
diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj
index 8f5b63c4c6f..eaaa1800d1c 100644
--- a/build/scripts/scripts.fsproj
+++ b/build/scripts/scripts.fsproj
@@ -28,6 +28,9 @@
test-jobs.yml
stale-jobs.yml
integration-jobs.yml
+
+ unified-release.yml
+