macroblog.rs @ 7c7967ebc8f7a1f67965f2300dde39fab0adc340

feat: Add release job
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f725d988ef641d16a74a3b768658934f653326f..fcb17cf186510df505d859fac696a0bf3c51fe4e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
 stages:
     - test
     - production
+    - release_job
 
 test:
     image: rust:alpine
@@ -28,3 +29,22 @@         - gem install faraday -v 1.8.0
         - dpl --provider=heroku --app=$HEROKU_APP --api-key=$HEROKU_API_KEY
     only:
         - master
+
+release_job:
+  stage: release
+  image: rust:alpine
+  rules:
+    - if: $CI_COMMIT_TAG
+  script:
+    paths:
+      - echo "running release_job"
+      - apk add musl-dev
+      - cargo build --release
+  artifacts:
+    - target/release/hyper
+    - target/release/actix
+  release:
+    name: 'Release $CI_COMMIT_TAG'
+    description: 'New macroblog version'
+    tag_name: '$CI_COMMIT_TAG'
+    ref: '$CI_COMMIT_TAG'