-
Notifications
You must be signed in to change notification settings - Fork 29
42 lines (40 loc) · 1.28 KB
/
ismrmrd_python_conda.yml
File metadata and controls
42 lines (40 loc) · 1.28 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
name: Publish Conda package
on:
push:
branches: [master]
tags: ["v*.*.*"]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build-conda-packages:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: ismrmrd-python-build
environment-file: conda/environment.yml
python-version: 3.12
auto-activate-base: false
- name: Build conda package
shell: bash -l {0}
working-directory: conda
run: |
./package.sh
echo "Packages built: $(find build_pkg -name ismrmrd-python*.tar.bz2)"
- name: Push conda package
shell: bash -l {0}
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
working-directory: conda
run: |
for p in $(find build_pkg -name 'ismrmrd-python*.conda' -or -name 'ismrmrd-python*.tar.bz2')
do
./publish_package.sh -u ismrmrd -t "$ANACONDA_TOKEN" -p "$p"
done