.gitlab-ci.yml 555 Bytes
Newer Older
Nicolas Gelot's avatar
Nicolas Gelot 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
stages:
  - build
  - deploy

default:
  image: python:3.10-slim
  before_script:
    - apt-get update
    - apt-get install -y git
    - pip install flit==3.4.0

check:
  stage: build
  script:
    - flit install --deps develop
    - black --check .
    - flake8 .
    - isort --check .

package:
  stage: build
  script:
    - flit build

publish:
  stage: deploy
  variables:
    FLIT_USERNAME: gitlab-ci-token
    FLIT_PASSWORD: ${CI_JOB_TOKEN}
    FLIT_INDEX_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
  script:
    - flit publish