Skip to content

github acttions

github acttions #2

Workflow file for this run

name: facebookresearch/nevergrad/release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.post[0-9]+'
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
CIRCLE_TAG: ${{ github.ref_name }}
jobs:
pypi-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/[email protected]
- uses: "./.github/actions/ubuntu_restore_all"
- name: Run wheel and check package
run: |
. venv/bin/activate
pip install wheel
rm -rf dist # make sure it's clean
echo "Creating sdist"
python setup.py sdist
echo "Created sdist, now creating wheel"
python setup.py bdist_wheel
echo "Created wheel"
mkdir nevergrad-build
mv dist nevergrad-build/
- name: Create .pypirc
run: |
if [[ $GITHUB_REF =~ ^refs/tags//(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\.post(0|[1-9][0-9]*))?/$ && $GITHUB_REF != 'refs/heads//.*/' ]]; then
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
fi
- name: Verify tag
run: python setup.py verify_circleci_version

Check failure on line 39 in .github/workflows/version.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/version.yml

Invalid workflow file

You have an error in your yaml syntax on line 39
- name: upload to pypi
run: |
echo "Deploying"
. venv/bin/activate
du -h nevergrad-build/dist/*
twine check nevergrad-build/dist/nevergrad-*
twine upload nevergrad-build/dist/nevergrad-* --verbose
fi