|
|
|
|
|
|
# Adapted from https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ |
|
|
|
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI |
|
|
|
|
|
|
|
on: push |
|
|
|
on: |
|
|
|
push: |
|
|
|
tags: |
|
|
|
- "release_[0-9]+_test[0-9]+" |
|
|
|
|
|
|
|
jobs: |
|
|
|
build-n-publish: |
|
|
|
|
|
|
- name: verify git tag vs. version |
|
|
|
run: | |
|
|
|
cd ml-agents |
|
|
|
python setup.py verify |
|
|
|
GITHUB_REF=${{ github.ref }} python setup.py verify |
|
|
|
- name: Build package |
|
|
|
run: | |
|
|
|
cd ml-agents |
|
|
|
|
|
|
if: startsWith(github.ref, 'refs/tags') |
|
|
|
packages_dir: ml-agents/dist/ |
|
|
|
with: |
|
|
|
skip_existing: true |
|
|
|
|
|
|
|
|