Skip to content

Fix hyperdrivetypes pypi upload error. Includes version bump to 1.0.20.11 #24

Fix hyperdrivetypes pypi upload error. Includes version bump to 1.0.20.11

Fix hyperdrivetypes pypi upload error. Includes version bump to 1.0.20.11 #24

name: build and upload hyperdrivetypes wheel
on:
push:
branches:
- "main"
# FIXME
pull_request:
jobs:
detect-changes:
uses: ./.github/workflows/check_diff.yaml
with:
pattern: ^python/hyperdrivetypes/pyproject.toml$
build-wheel:
name: build hyperdrivetypes wheel
needs: detect-changes
runs-on: ubuntu-latest
if: needs.detect-changes.outputs.changed == 'true'
steps:
- name: checkout hyperdrive
uses: actions/checkout@v4
with:
token: ${{github.token}}
submodules: recursive
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
token: ${{github.token}}
- name: set up pip and pypechain
run: >
python -m pip install --upgrade pip;
python -m pip install --upgrade -r python/hyperdrivetypes/prerequisite.txt;
- name: generate hyperdrivetypes files
run: make build
- name: build hyperdrivetypes package
shell: bash
run: scripts/build-hyperdrivetypes-wheel.sh
- name: upload wheel
uses: actions/upload-artifact@v4
with:
name: build-wheel
path: dist/*.whl
- name: upload source distribution
uses: actions/upload-artifact@v4
with:
name: build-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build-wheel]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: write
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
pattern: build-*
path: dist
merge-multiple: true
- name: Upload to pypi
uses: pypa/gh-action-pypi-publish@release/v1