summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefanwimmer1282022-12-25 23:25:20 +0100
committerstefanwimmer1282022-12-25 23:25:20 +0100
commit7db799c17d907d843db789f2f2454b2c1bd4cbac (patch)
treebf86002cf3e3f13acfeb810992688e898b8a58a3
parentc17302366ef1a23028d4b0c8742e242de435f067 (diff)
downloadaur-7db799c17d907d843db789f2f2454b2c1bd4cbac.tar.gz
Update CI to only publish package on tag
-rw-r--r--.gitlab-ci.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index edb8b1dd1674..9714a432fd3a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
stages:
- build
+ - publish
build:
stage: build
@@ -10,5 +11,16 @@ build:
- passwd -d builduser
- printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
- sudo -u builduser makepkg -s --noconfirm
- - "bash -c 'source PKGBUILD && curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" --upload-file \"$pkgname-$pkgver-$pkgrel-any.pkg.tar.zst\" \"$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/$pkgname/$pkgver-$pkgrel/$pkgname-$pkgver-$pkgrel-any.pkg.tar.zst\"'"
+ artifacts:
+ paths:
+ - "*.pkg.tar.zst"
timeout: 2h
+
+publish:
+ stage: publish
+ image: alpine:latest
+ rules:
+ - if: $CI_COMMIT_TAG
+ script:
+ - apk add curl
+ - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "zellij-selector-$CI_COMMIT_TAG-any.pkg.tar.zst" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/zellij-selector/$CI_COMMIT_TAG/zellij-selector-$CI_COMMIT_TAG-any.pkg.tar.zst"'