-
Notifications
You must be signed in to change notification settings - Fork 91
36 lines (33 loc) · 1.17 KB
/
Copy pathpython-package-conda.yml
File metadata and controls
36 lines (33 loc) · 1.17 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
name: Python Package using Conda
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: pyepo-build
python-version: "3.9"
auto-activate: false
conda-remove-defaults: true
channels: conda-forge,pytorch,gurobi
channel-priority: strict
- name: Install Conda-Build and Anaconda-Client
run: conda install -n base conda-build anaconda-client --yes
- name: Build Conda Package
run: conda build ./pkg -c conda-forge -c pytorch -c gurobi
- name: Upload Conda Package
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
# --output only computes the path; the build above produced the package
PKG_PATH=$(conda build --output ./pkg -c conda-forge -c pytorch -c gurobi)
echo "Package path: $PKG_PATH"
# anaconda-client lives in base; run it there regardless of the active env
conda run -n base anaconda upload --user pyepo "$PKG_PATH"