.gitlab-ci.yml 1.42 KB
Newer Older
onny's avatar
onny committed
1 2
stages:
  - compiling
onny's avatar
onny committed
3 4
  - packaging
  - publishing
onny's avatar
onny committed
5

onny's avatar
onny committed
6
image: node:latest
onny's avatar
onny committed
7

onny's avatar
onny committed
8
compiling:
onny's avatar
onny committed
9 10
  stage: compiling
  script:
onny's avatar
onny committed
11
    - npm install
onny's avatar
onny committed
12
    - make build-js
onny's avatar
onny committed
13
  cache:
onny's avatar
onny committed
14
    paths:
onny's avatar
onny committed
15
      - node_modules/
onny's avatar
onny committed
16

onny's avatar
onny committed
17
packaging:
onny's avatar
onny committed
18 19
  stage: packaging
  script:
onny's avatar
onny committed
20
    - apt update
onny's avatar
onny committed
21 22
    - DEBIAN_FRONTEND="noninteractive" apt install -y wget sudo
    - wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
onny's avatar
onny committed
23
    - wget https://github.com/ChristophWurst/krankerl/releases/download/v0.12.3/krankerl_0.12.3_amd64.deb
onny's avatar
onny committed
24
    - sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb krankerl_0.12.3_amd64.deb
onny's avatar
onny committed
25
    - krankerl package
onny's avatar
onny committed
26
    - echo CI_PACKAGING_JOBID="${CI_JOB_ID}" > $CI_PROJECT_DIR/variables.env
onny's avatar
onny committed
27 28
  artifacts:
    paths:
onny's avatar
onny committed
29
      - build/artifacts/radio.tar.gz
onny's avatar
onny committed
30 31
    reports:
      dotenv: variables.env
onny's avatar
onny committed
32
    expire_in: never
onny's avatar
onny committed
33

onny's avatar
onny committed
34
publishing:
onny's avatar
onny committed
35
  stage: publishing
onny's avatar
onny committed
36
  image: registry.gitlab.com/gitlab-org/release-cli:latest
onny's avatar
onny committed
37 38 39 40 41
  needs:
    - job: packaging
      artifacts: true
  rules:
    - if: $CI_COMMIT_TAG
onny's avatar
onny committed
42
  script:
onny's avatar
onny committed
43
    - EXTRA_DESCRIPTION="$(sed '1,/^## /!d;/^## /d' CHANGELOG.md)";
onny's avatar
onny committed
44
    - >
onny's avatar
onny committed
45
      release-cli create --name "v$CI_COMMIT_TAG" --description "$EXTRA_DESCRIPTION"
onny's avatar
onny committed
46
      --tag-name $CI_COMMIT_TAG --ref $CI_COMMIT_SHA
onny's avatar
onny committed
47
      --assets-link "{\"name\":\"radio\",\"url\":\"https://git.project-insanity.org/onny/nextcloud-app-radio/-/jobs/${CI_PACKAGING_JOBID}/artifacts/raw/build/artifacts/radio.tar.gz\",\"link_type\":\"other\"}"