-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (75 loc) · 2.62 KB
/
ci_conda_publish.yml
File metadata and controls
89 lines (75 loc) · 2.62 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI Conda Publish
on: workflow_dispatch
jobs:
build:
name: Build conda artifact
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Setup conda
uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
with:
auto-update-conda: true
python-version: "3.11"
- name: Install conda requirements
shell: bash -el {0}
run: |
conda install -c conda-forge conda-build grayskull=3.1.0
- name: Build conda metadata
shell: bash -el {0}
run: |
conda grayskull pypi data-validation-engine
- name: Replace default & incorrect values in the recipe
run: |
sed -i 's/- AddYourGitHubIdHere/- georgeRobertson\n - stevenhsd/' ./data-validation-engine/meta.yaml
sed -i 's/- data_validation_engine/- dve/' ./data-validation-engine/meta.yaml
- name: Build Conda packages
shell: bash -el {0}
run: |
conda config --set anaconda_upload no
make cdist
CONDA_ART="$(find conda_dist/noarch/ -type f -name '*.conda' | head -n 1)"
echo "CONDA_ART=$CONDA_ART" >> "$CONDA_ART"
- name: Upload Conda Artifact
uses: actions/upload-artifact@v5
with:
name: conda-artifacts
path: $CONDA_ART
- name: Conda cleanup
shell: bash -el {0}
run: conda build purge
publish-to-conda:
name: Publish to Conda
needs:
- build
runs-on: ubuntu-24.04
environment: conda
steps:
- name: Setup Conda
uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
with:
auto-update-conda: true
python-version: "3.11"
- name: Install conda dependencies
shell: bash -el {0}
run: |
conda install anaconda-client
- name: Download conda art
uses: actions/download-artifact@v6
with:
name: conda-artifacts
path: conda_dist/
- name: Obtain conda artifact
shell: bash -el {0}
run: |
CONDA_ART="$(find conda_dist/noarch/ -type f -name '*.conda' | head -n 1)"
echo "CONDA_ART=$CONDA_ART" >> "$CONDA_ART"
- name: Upload Conda Artifact
env:
ANACONDA_TOKEN = ${{ secrets.ANACONDA_TOKEN }}
ANACONDA_USER = ${{ secrets.ANACONDA_USER }}
shell: bash -el {0}
run: |
anaconda login --user "$ANACONDA_USER"
anaconda upload --user "$ANACONDA_USER" "$CONDA_ART"
# TODO - haven't been able to get the login working. Needs fixing