summarylogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 9714a432fd3aa8c050e86ea1bc4b272e934fe69f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
stages:
  - build
  - publish

build:
  stage: build
  image: archlinux:base-devel
  script:
    - pacman -Syu --noconfirm
    - useradd builduser -m
    - passwd -d builduser
    - printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
    - sudo -u builduser makepkg -s --noconfirm
  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"'