diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3a21e947a3e40b12a7e62b1272e1a3b433d5a87f..e7f9f84fa0807c3626de0750faca4201b921b40f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,8 @@
 stages:
   - lint
   - test
+  - package
+  - deploy
 
 lint:
   stage: lint
@@ -15,7 +17,29 @@ test:
       - PY_VER: ["3.7", "3.8", "3.9", "3.10"]
   image: $CI_REGISTRY/funkwhale/backend-test-docker:$PY_VER
   before_script: 
-    - pip install poetry
     - poetry install
   script:
     - poetry run python test/test.py
+
+package: 
+  stage: package
+  image: $CI_REGISTRY/funkwhale/backend-test-docker:3.10
+  before_script:
+    - poetry install
+  script:
+    - poetry build
+  artifacts:
+    paths:
+      - dist/*
+
+deploy:
+  image: $CI_REGISTRY/funkwhale/backend-test-docker:3.10
+  before_script:
+    - poetry install
+    - git pull --tags
+  script:
+    - poetry version $(git describe --tags --abbrev=0)
+    - poetry build
+    - poetry publish --username $PYPI_USERNAME --password $PYPI_TOKEN
+  only:
+    - tags
diff --git a/pyproject.toml b/pyproject.toml
index 2c5febddb7ba44616923948a64d61a851a25dc9e..4b1f371f9f1b802460def16f3dabbe5cc2b11243 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "requests-http-message-signatures"
-version = "0.3.0-dev3"
+version = "v0.2.0"
 description = "A request authentication plugin implementing IETF HTTP Message Signatures"
 readme = "README.md"
 homepage = "https://dev.funkwhale.audio/funkwhale/requests-http-message-signatures"