浏览代码

tag filtering

/tag-release_8_test0
Chris Elion 4 年前
当前提交
f129ded4
共有 3 个文件被更改,包括 14 次插入4 次删除
  1. 11
      .github/workflows/publish_pypi.yaml
  2. 2
      ml-agents/mlagents/trainers/__init__.py
  3. 5
      ml-agents/setup.py

11
.github/workflows/publish_pypi.yaml


# 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

2
ml-agents/mlagents/trainers/__init__.py


__version__ = "0.21.0.dev0"
# Git tag that will be checked to determine whether to trigger upload to pypi
__release_tag__ = "release_8_test" # TODO DO NOT MERGE
__release_tag__ = "release_8_test0" # TODO DO NOT MERGE

5
ml-agents/setup.py


description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if "GITHUB_REF" in os.environ:
tag = os.getenv("GITHUB_REF").replace("refs/tags", "")
else:
tag = os.getenv("CIRCLE_TAG")
if tag != EXPECTED_TAG:
info = "Git tag: {} does not match the expected tag of this app: {}".format(

正在加载...
取消
保存