v0.3.8 #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Package using Conda | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: pyepo-build | |
python-version: 3.9 | |
auto-activate-base: false | |
- name: Install Conda-Build and Anaconda-Client | |
run: conda install conda-build anaconda-client | |
- name: Build Conda Package | |
run: conda build ./pkg -c conda-forge -c pytorch -c gurobi -c default | |
- name: Extract Package Version | |
run: | | |
PACKAGE_VERSION=$(conda search --json -c local pyepo | jq -r '.pyepo[-1].version') | |
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV | |
- name: Find and Upload Conda Package | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} | |
run: | | |
CONDA_BLD_PATH=$(conda info --json | jq -r '.conda_prefix')/conda-bld | |
echo "Conda build path: $CONDA_BLD_PATH" | |
conda install -n pyepo-build anaconda-client --yes | |
conda run -n pyepo-build anaconda upload --user pyepo $CONDA_BLD_PATH/noarch/pyepo-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 |