| 1 | image: "registry.gitlab.com/smc/dockerfiles:font-builder" |
| 2 | |
| 3 | stages: |
| 4 | - build |
| 5 | - test |
| 6 | - release |
| 7 | |
| 8 | build-branch: |
| 9 | stage: build |
| 10 | before_script: |
| 11 | - apt-get update -y |
| 12 | - apt-get install -y make python3-pip |
| 13 | - pip3 install -r requirements.txt |
| 14 | script: |
| 15 | - make otf ttf webfonts |
| 16 | artifacts: |
| 17 | paths: |
| 18 | - build/ |
| 19 | except: |
| 20 | - tags |
| 21 | |
| 22 | build-tag: |
| 23 | stage: build |
| 24 | before_script: |
| 25 | - apt-get update -y |
| 26 | - apt-get install -y make python3-pip zip |
| 27 | - pip3 install -r requirements.txt |
| 28 | script: |
| 29 | - make ttf otf webfonts |
| 30 | - sh tools/artifacts.sh |
| 31 | artifacts: |
| 32 | expire_in: 1000 yrs |
| 33 | paths: |
| 34 | - build/ |
| 35 | only: |
| 36 | - tags |
| 37 | |
| 38 | test: |
| 39 | stage: test |
| 40 | before_script: |
| 41 | - apt-get update -y |
| 42 | - apt-get install -y make libharfbuzz-bin python3-pip |
| 43 | - pip3 install -r requirements.txt |
| 44 | script: |
| 45 | - make test |
| 46 | |
| 47 | create-gitlab-release: |
| 48 | image: "ruby:2.5-alpine" |
| 49 | stage: release |
| 50 | script: |
| 51 | - gem install --no-document gitlab |
| 52 | - ruby release.rb |
| 53 | only: |
| 54 | - tags |
| 55 | |
| 56 | release: |
| 57 | stage: release |
| 58 | trigger: smc/smc.org.in |
| 59 | only: |
| 60 | - tags |