-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (51 loc) · 1.56 KB
/
conda_build_and_publish.yml
File metadata and controls
61 lines (51 loc) · 1.56 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
name: publish_conda
on:
release:
types: [published]
push:
branches: [master]
tags:
- '**'
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # All history for use later with the meta.yaml file for conda-recipes
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.13
mamba-version: "*"
channels: conda-forge, ccpi
conda-remove-defaults: "true"
- run: conda install conda-build conda-verify
- name: conda build
run: >
conda build -c conda-forge -c ccpi --python=3.13 --output-folder dist Wrappers/Python/conda-recipe
- name: Upload conda package as artifact
uses: actions/upload-artifact@v4
with:
name: cilviewer
path: dist
conda-upload:
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
runs-on: ubuntu-22.04
needs: build
defaults: {run: {shell: 'bash -el {0}', working-directory: dist}}
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
mamba-version: "*"
channels: conda-forge
- name: Download built conda package
uses: actions/download-artifact@v4
with:
name: cilviewer
path: dist
- run: conda install anaconda-client
- name: Upload to ccpi anaconda channel
run: >
anaconda -v -t ${{ secrets.ANACONDA_TOKEN }} upload --force --label 'main' noarch/*.conda