-
Notifications
You must be signed in to change notification settings - Fork 57
63 lines (63 loc) · 1.87 KB
/
Copy pathpackaging.yaml
File metadata and controls
63 lines (63 loc) · 1.87 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
name: Python and Conda Packaging
on:
workflow_dispatch:
workflow_call:
jobs:
build-python-dist:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build package
run: python -m build
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: package-python
path: dist
build-conda-dist:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: build-env
python-version: "3.11"
auto-update-conda: true
auto-activate-base: false
miniforge-version: "latest"
channels: conda-forge,default
use-mamba: true
- name: Install conda-build and conda-index
run: mamba install -c conda-forge conda-build conda-index
shell: bash -el {0}
- name: Build Conda package (using rattler-build)
uses: prefix-dev/rattler-build-action@v0.2.6
with:
recipe-path: recipe/meta.yaml
upload-artifact: false
- name: Clean conda build directory
run: |
rm -rf output/bld
rm -rf output/src_cache
rm -rf output/linux-64
- name: Index conda build directory
run: |
python -m conda_index --channeldata --rss ./output
shell: bash -el {0}
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: package-conda
path: output/