-
Notifications
You must be signed in to change notification settings - Fork 358
44 lines (44 loc) · 1.37 KB
/
version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- name: Verify tag
run: python setup.py verify_circleci_version
- 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