Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Set version from tag
run: sed -i "s/^version = \".*\"/version = \"$TAG_VERSION\"/" pyproject.toml
with:
fetch-depth: 0 # setuptools-scm needs full git history
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install build twine setuptools-scm
- name: Verify version
run: |
PACKAGE_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
PACKAGE_VERSION=$(python -m setuptools_scm)
echo "Publishing version: $PACKAGE_VERSION"
- name: Build and publish
env:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/update-version.yml

This file was deleted.

6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=61.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "note-python"
version = "2.1.4"
dynamic = ["version"]
description = "Cross-platform Python Library for the Blues Wireless Notecard"
authors = [
{name = "Blues Inc.", email = "support@blues.com"},
Expand Down Expand Up @@ -35,5 +35,7 @@ Repository = "https://github.com/blues/note-python"
[tool.setuptools]
packages = ["notecard"]

[tool.setuptools_scm]

[tool.pytest.ini_options]
addopts = "--ignore=test/hitl/"