diff options
author | stefanwimmer128 | 2022-12-25 09:39:08 +0100 |
---|---|---|
committer | stefanwimmer128 | 2022-12-25 09:39:08 +0100 |
commit | 35ec2ca97fd290109b5b711f023989d5c1474bdf (patch) | |
tree | ba451f5f4f9c3a01c9d582526cd05b40658ff8e8 /.gitlab-ci.yml | |
parent | f7f5afbb873b3a5d32e9b9078ffb8b868c5cdbf8 (diff) | |
download | aur-35ec2ca97fd290109b5b711f023989d5c1474bdf.tar.gz |
Update CI to only publish package on tag
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07f9e89ab29b..d9e65ff06a82 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 sh -c "gpg --recv-key EBE41E90F6F12F6D && makepkg -s --noconfirm" - - "bash -c 'source PKGBUILD && curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" --upload-file \"$pkgname-$pkgver-$pkgrel-x86_64.pkg.tar.zst\" \"$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/$pkgname/$pkgver-$pkgrel/$pkgname-$pkgver-$pkgrel-x86_64.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 "firedragon-unsigned-extensions-$CI_COMMIT_TAG-x86_64.pkg.tar.zst" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/firedragon-unsigned-extensions/$CI_COMMIT_TAG/firedragon-unsigned-extensions-$CI_COMMIT_TAG-x86_64.pkg.tar.zst"' |