-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
65 lines (61 loc) · 1.39 KB
/
.gitlab-ci.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
stages:
- test
- build
- release
image: python:3.12
test-run:
stage: test
script:
- wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
- bash Miniforge3-$(uname)-$(uname -m).sh -b
- ls ~/miniforge3
- ~/miniforge3/bin/conda init bash
- . ~/.bashrc
- conda --version
- pip install .
- conda-app install mercurial
- . ~/.bashrc
- conda-app install pipx python=3.11
- conda env list
- which pipx
- pipx --version
- conda-app uninstall pipx -y
- conda env list
- hg debuginstall
- hg-setup -h
- hg-setup init --auto
- mkdir -p $HOME/tmp
- cd $HOME/tmp
- hg clone https://github.com/fluiddyn/conda-app.git
- cd conda-app
- ls
- conda-app list
build-package:
stage: build
before_script:
- python -m pip install build twine
script:
- python -m build
- twine check dist/*
needs: []
artifacts:
when: always
paths:
- dist
expire_in: 24 hrs
# manually set TWINE_PASSWORD in web interface to your PyPI API token
release-package:
stage: release
needs: ["build-package", "test-run"]
rules:
- if: '$CI_MERGE_REQUEST_ID'
when: never
- if: '$CI_COMMIT_TAG'
when: on_success
variables:
TWINE_USERNAME: __token__
before_script:
- pip install twine -U
script:
- ls dist/*
- twine upload dist/*