Add deploy job to GitLab Pipeline

This commit is contained in:
Marcel Kapfer 2022-04-05 18:09:24 +02:00
parent a09e8ceadc
commit 9e7b64bb35
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -8,6 +8,7 @@ variables:
stages:
- build
- deploy
build-job:
stage: build
@ -23,3 +24,18 @@ build-job:
- ./*.deb
rules:
- if: $CI_COMMIT_TAG
deploy-job:
stage: deploy
script:
- apt update && apt install -y git devscripts debhelper gnupg
- export VERSION=$(git describe --abbrev=0 --tags | cut -d'v' -f2)
- echo "$GPG_PRIVATE_KEY" | tr -d '\r' | gpg --import -
- echo "$GPG_PUBLIC_KEY" | tr -d '\r' | gpg --import -
- cd "$PACKAGE"_"$VERSION" || exit
- debuild -S -k6D289F254B41A009B6AB5AC3122720F932D5CE46
- cd ..
- dput ppa:mmk2410/intellij-idea "$PACKAGE"_"$VERSION"-1_source.changes
rules:
- if: $CI_COMMIT_TAG