Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

feat: update testnets #237

feat: update testnets

feat: update testnets #237

Workflow file for this run

name: publish
on:
push:
branches: [ master ]
tags: [ "*" ]
paths-ignore:
- '.github/**'
pull_request:
branches: [ master ]
jobs:
build-wheels-and-publish:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
architecture: [ x64 ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Installing pip packages
run: |
pip install wheel
pip install twine
- uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.2.2"
- name: Install dependencies
run: |
poetry install
- name: Testing (native blst tests)
run: |
python setup.py build_ext --inplace
python ./lido_sdk/blstverify/test.py
- name: Testing (pytest)
env:
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
run: |
poetry run pytest .
- name: Building binary wheel distribution (windows and macos)
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
run: |
python setup.py bdist_wheel --universal
- name: Building source distrubution (linux only)
if: matrix.os == 'ubuntu-latest'
run: |
python setup.py sdist
- name: Upload binary distrubutions as artifacts
uses: actions/upload-artifact@v2
with:
name: wheels
path: ./dist
if-no-files-found: error
- name: Publish distribution to PyPI
if: startsWith(github.event.ref, 'refs/tags')
env:
TWINE_USERNAME: __token__
TWINE_NON_INTERACTIVE: 1
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --non-interactive --skip-existing --verbose 'dist/*'
- name: Publish distribution to Test PyPI
continue-on-error: true
env:
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_USERNAME: __token__
TWINE_NON_INTERACTIVE: 1
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
twine upload --non-interactive --skip-existing --verbose 'dist/*'