Skip to content

Downgrade networkx to 3.4.2 so its python 3.10 compatible #8

Downgrade networkx to 3.4.2 so its python 3.10 compatible

Downgrade networkx to 3.4.2 so its python 3.10 compatible #8

Workflow file for this run

name: Python uv Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write # required for GitHub Release
id-token: write # required for PyPI Trusted Publishing
actions: write # required for tag deletion
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Sync dependencies
run: uv sync --all-groups
- name: Install dependencies
run: uv pip install -e .
- name: Run tests
id: test
continue-on-error: true
run: uv run pytest
- name: Delete tag on failure
if: steps.test.conclusion == 'failure'
run: |
echo "Tests failed. Deleting tag ${GITHUB_REF#refs/tags/}..."
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git push --delete origin ${GITHUB_REF#refs/tags/}
exit 1
- name: Build package
run: uv build
- name: Get version from tag
id: tag_name
run: |
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Read Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Build changelog
id: gen_changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
failOnError: "true"
configuration: .github/workflows/release_config.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish release on GitHub
uses: softprops/action-gh-release@v1
with:
files: dist/*
body: |
## Release Notes (from CHANGELOG.md)
${{ steps.changelog_reader.outputs.changes }}
---
## Detailed Changes (auto-generated)
${{ steps.gen_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPI via Trusted Publishing
run: uv publish