1
- name : publish_conda
2
-
1
+ name : " 🐍 Build and upload Conda packages"
3
2
on :
4
- release :
5
- types : [edited, created]
3
+ workflow_dispatch :
6
4
jobs :
7
5
conda-deploy :
8
- name : Uploading to Loop3d for python ${{ matrix.os }})
9
- runs-on : ${{ matrix.os }}
6
+ name : Building conda package for python ${{ matrix.os }})
7
+ runs-on : ubuntu-latest
10
8
strategy :
11
9
fail-fast : false
12
10
matrix :
13
- os : ["ubuntu-latest", "windows-latest","macos-latest"]
14
- python-version : ["3.9","3.8","3.7"]
11
+ python-version : ${{ fromJSON(vars.PYTHON_VERSIONS)}}
15
12
steps :
16
- - uses : conda-incubator/setup-miniconda@v2
13
+ - uses : conda-incubator/setup-miniconda@v3
17
14
with :
18
15
auto-update-conda : true
19
16
python-version : ${{ matrix.python-version }}
20
-
21
- - uses : actions/checkout@v2
17
+ - uses : actions/checkout@v4
22
18
- name : update submodules
23
- # shell: bash -l {0}
24
19
run : |
25
- git submodule update --init --recursive
26
- - name : Add msbuild to PATH
27
- if : matrix.os == 'windows-latest'
28
-
29
- - name : Conda build'
20
+ git submodule update --init --recursive
21
+ - name : Conda build
30
22
env :
31
23
ANACONDA_API_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
32
24
shell : bash -l {0}
33
25
run : |
34
- conda install -c conda-forge conda-build scikit-build numpy=1.20 cython anaconda-client -y
35
- conda build -c anaconda -c conda-forge -c loop3d --output-folder conda conda
36
- conda install anaconda-client -y
37
- - name : upload windows
38
- env :
39
- ANACONDA_API_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
40
- if : matrix.os == 'windows-latest'
41
- shell : bash -l {0}
42
- run : |
43
- anaconda upload --label main conda/win-64/*.tar.bz2
44
- - name : upload linux
45
- env :
46
- ANACONDA_API_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
47
- if : matrix.os == 'ubuntu-latest'
26
+ conda install -c conda-forge conda-build scikit-build numpy cython anaconda-client conda-libmamba-solver -y
27
+ conda build -c conda-forge -c loop3d --output-folder conda conda --python ${{matrix.python-version}}
28
+ conda convert -p all conda/linux-64/*.tar.bz2 -f -o conda
29
+ - name : upload artifacts
30
+ uses : actions/upload-artifact@v4
31
+ with :
32
+ name : conda-build-${{ matrix.python-version }}
33
+ path : conda
34
+ upload_to_conda :
35
+ runs-on : ubuntu-latest
36
+ needs : conda-deploy
37
+ strategy :
38
+ fail-fast : false
39
+ matrix :
40
+ python-version : ${{ fromJSON(vars.PYTHON_VERSIONS)}}
41
+ steps :
42
+ - uses : actions/download-artifact@v4
43
+ with :
44
+ name : conda-build-${{ matrix.python-version }}
45
+ path : conda
46
+ - uses : conda-incubator/setup-miniconda@v3
47
+ - name : upload all files to conda-forge
48
48
shell : bash -l {0}
49
- run : |
50
- anaconda upload --label main conda/linux-64/*.tar.bz2
51
- - name : upload macosx
52
49
env :
53
50
ANACONDA_API_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
54
- if : matrix.os == 'macos-latest'
55
- shell : bash -l {0}
56
51
run : |
57
- anaconda upload --label main conda/osx-64/*.tar.bz2
58
-
52
+ conda install -c anaconda anaconda-client -y
53
+ anaconda upload --label main conda/*/*.tar.bz2
54
+
0 commit comments