All checks were successful
Publish to PyPI Registry / publish (release) Successful in 1m14s
proof-measure is a separate, public, unauthenticated Dragonchain service. Adds: - UnauthenticatedClient: HMAC-free transport mirroring Client (session injection, allow_redirects=False, from_dict decoding). - ProofMeasureClient: get_security / report / health; default base URL https://proof-measure.dragonchain.com. Standalone (ProofMeasureClient()) and via DragonchainSDK.proof_measure. - Proof-measure dataclass models (decimals as strings, timestamps as int). - .gitea/workflows/publish.yml: build + twine upload to the Gitea PyPI registry on release (the SDK had no publish workflow before). Also fixes 3 pre-existing failing tests: _FakeSession.request didn't accept the allow_redirects kwarg the client now passes (added by the prior redirect change), so the suite was red at HEAD.
38 lines
903 B
YAML
38 lines
903 B
YAML
name: Publish to PyPI Registry
|
|
|
|
on:
|
|
release:
|
|
types: [created, published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install build tooling
|
|
run: python -m pip install --upgrade pip build twine
|
|
|
|
- name: Run tests
|
|
run: |
|
|
python -m pip install -e '.[dev]'
|
|
python -m pytest -q
|
|
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
- name: Publish to Gitea PyPI registry
|
|
env:
|
|
TWINE_USERNAME: sa-dc-build
|
|
TWINE_PASSWORD: ${{ secrets.SA_DC_BUILD_API_TOKEN }}
|
|
TWINE_REPOSITORY_URL: https://git.dragonchain.com/api/packages/dragonchain/pypi
|
|
run: twine upload --non-interactive dist/*
|