From 93e6bf55fe90d467e5a8717b738fbc5775e3604f Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo.trentesaux@lilo.org>
Date: Thu, 8 Jun 2023 13:25:03 +0200
Subject: [PATCH] add gitlab ci

---
 .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++
 README.md      |  2 ++
 2 files changed, 30 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..fa06a4d
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,28 @@
+# Official language image. Look for the different tagged releases at:
+# https://hub.docker.com/r/library/rust/tags/
+image: "rust:latest"
+
+stages:
+  - build
+
+build:
+  stage: build
+  # image used for this build
+  image: rust
+  # build script
+  script:
+    - cargo build --release
+  # output file
+  artifacts:
+    paths:
+      - target/release/gcli
+  # use cache to avoid re-downloading and re-building all dependencies
+  cache:
+    - key:
+        files:
+          - Cargo.lock
+      paths:
+        - target/release
+  # only build gcli when adding a tag
+  only:
+    - tags
\ No newline at end of file
diff --git a/README.md b/README.md
index 486a465..d888442 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,8 @@ Using
 - https://github.com/duniter/substrate
 - https://github.com/duniter/subxt
 
+Download from [release](https://git.duniter.org/clients/rust/gcli-v2s/-/releases) or build with `cargo build`.
+
 ## Usage
 
 If using a different runtime, update the metadata for the client to compile:
-- 
GitLab