Merge pull request #2 from Anaconda-Platform/jb_update_publishing #3
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: Upload Python Package | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- '*' | |
permissions: | |
contents: read | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Install dependencies | |
# https://github.com/conda-incubator/setup-miniconda | |
uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # v2 | |
with: | |
channels: defaults,ae5-admin | |
auto-activate-base: true | |
activate-environment: github.action | |
environment-file: environment.github.yml | |
- name: Conda Info | |
run: | | |
conda info | |
- name: Unit Tests | |
run: | | |
anaconda-project run test:unit | |
anaconda-project run coverage report | |
anaconda-project run coverage xml | |
- name: Build Conda Package | |
run: | | |
mkdir build | |
conda build conda-recipe --output-folder build | |
- name: Publish Conda Package | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
anaconda --verbose --token $ANACONDA_TOKEN upload --user ae5-admin build/noarch/mlflow-adsp-*.tar.bz2 --force |