.gitlab-ci.yml 733 Bytes
Newer Older
noplanman's avatar
noplanman committed
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
variables:
  VERSION: $CI_COMMIT_TAG

stages:
  - build
  - deploy

armv5:
  extends: .main
  variables: {ARCH: armel, NAME: "borg-${VERSION}-armv5"}

armv7:
  extends: .main
  variables: {ARCH: armv7hf, NAME: "borg-${VERSION}-armv7"}

arm64:
  extends: .main
  variables: {ARCH: aarch64, NAME: "borg-${VERSION}-arm64"}

.main:
  stage: build
  only: [tags]
  variables: {NAME: "borg-${VERSION}-${ARCH}"}
  script:
    - ./build.sh $ARCH $VERSION
    - ./extract.sh $ARCH $VERSION $NAME
  artifacts:
    expire_in: 1 day
    paths: [$NAME]

deploy artifacts to bintray:
  stage: deploy
  only: [tags]
  script:
    - md5sum borg-${VERSION}-*
    - apk add curl
    - ci/bintray.sh
  dependencies:
    - armv5
    - armv7
    - arm64