-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (59 loc) · 1.71 KB
/
build_and_upload_conda.yaml
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: Build and upload conda package
on:
# release:
# types: [published]
push:
branches:
- master
pull_request:
types: [closed]
branches:
- master
jobs:
build_and_upload:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
arch: [x86_64, arm64]
exclude:
- os: ubuntu-latest
arch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: pyoti
auto-update-conda: true
python-version: 3.9
channels: conda-forge,defaults
channel-priority: strict
architecture: ${{ matrix.arch }}
- name: Set environment variable for sourcing conda (Linux)
if: runner.os == 'Linux'
run: |
echo "RUNNER_OS_SOURCE=/home/runner/.profile" >> $GITHUB_ENV
- name: Set environment variable for sourcing conda (Mac)
if: runner.os == 'macOS'
run: |
echo "RUNNER_OS_SOURCE=/Users/runner/.profile" >> $GITHUB_ENV
- name: Install build tools
run: |
source $RUNNER_OS_SOURCE
conda activate pyoti
conda install -y conda-build anaconda-client
- name: Build Conda package
run: |
source $RUNNER_OS_SOURCE
conda activate pyoti
conda build conda
- name: Upload Conda package
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
source $RUNNER_OS_SOURCE
conda activate pyoti
PACKAGE_PATH=$(conda build conda --output)
anaconda -t $ANACONDA_TOKEN upload -u mauriaristi $PACKAGE_PATH --channel main --label main --force