From 4be3673b40e5eeb4f18bf723b439cb9a24ec293d Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas@jonasled.de>
Date: Sat, 25 Jan 2025 12:46:08 +0100
Subject: [PATCH] add ci config for build

---
 .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..ce76fe1
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,41 @@
+.parallel:
+  parallel:
+    matrix:
+    - GOOS: "linux"
+      GOARCH:
+      - amd64
+      - arm64
+    - GOOS: "windows"
+      GOARCH:
+      - amd64
+      - arm64
+    - GOOS: "darwin"
+      GOARCH:
+      - amd64
+      - arm64
+
+stages:
+- build
+- deploy
+
+build-application-binary:
+  stage: build
+  needs: []
+  parallel: !reference [ .parallel, parallel ]
+  image: golang:1.23.5
+  script:
+  - CGO_ENABLED=0 go build -ldflags="-s -w" -o ems-esp-logger-${GOOS}-${GOARCH} ./
+  - "if [ \"${GOOS}\" = \"windows\" ]; then
+
+    \  mv ems-esp-logger-${GOOS}-${GOARCH} ems-esp-logger-${GOOS}-${GOARCH}.exe\ 
+
+    fi\n"
+  artifacts:
+    paths:
+    - ems-esp-logger-${GOOS}-${GOARCH}
+    - ems-esp-logger-${GOOS}-${GOARCH}.exe
+    expire_in: 1 week
+
+include:
+- project: 'infra/ci'
+  file: '/pipelines/docker.yml'
-- 
GitLab