Skip to content

Move AdvantageBuffer to its own file and switch to tensordict (#9) #191

Move AdvantageBuffer to its own file and switch to tensordict (#9)

Move AdvantageBuffer to its own file and switch to tensordict (#9) #191

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python PyPi and Conda
on:
release:
types: [created]
# schedule:
# - cron: '1 6 * * *'
workflow_dispatch: #allows you to trigger manually
push:
branches:
- main
jobs:
deploy_python_pypi:
name: "Deploy Python PyPi"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/* || echo "File Already exists"; exit 0
# Disable usage of conda since it never installs correctly.
# deploy_python_conda:
# runs-on: ubuntu-latest
# name: "Deploy Python Conda"
# needs: deploy_python_pypi
# strategy:
# max-parallel: 5
# timeout-minutes: 500
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python 3.6
# uses: actions/setup-python@v2
# with:
# python-version: 3.6
# - name: Add conda to system path
# run: |
# # $CONDA is an environment variable pointing to the root of the miniconda directory
# echo $CONDA/bin >> $GITHUB_PATH
# - name: Install dependencies
# run: |
# conda install -y -c fastchan conda-build anaconda-client fastrelease
# - name: Build Conda package
# timeout-minutes: 360
# run: |
# fastrelease_conda_package --do_build false
# cd conda
# conda build --no-anaconda-upload --output-folder build fastrl -c fastchan
# anaconda upload build/noarch/fastrl-*-*.tar.bz2
# env:
# ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
# - name: Test package import
# run: |
# conda install -c josiahls fastrl
# conda update -c josiahls fastrl
# python -c "import fastrl"