Skip to content

Commit

Permalink
build: automatically update the version string in setup.py when build…
Browse files Browse the repository at this point in the history
…ing the package with github actions.
  • Loading branch information
keara-soloway committed Apr 11, 2023
1 parent 1d5c3f4 commit edc6fd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/pypi-pyblish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build
- name: Update setup script with version (tag) name
run : |
sed -i "s/PACKAGE_VERSION/${{ github.ref_name }}/" setup.py
- name: Build package
run: python -m build
- name: Publish package
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import os
import setuptools

version = 'PACKAGE_VERSION'

def datafiles(idir, pattern=None):
"""Return list of data files in provided relative dir"""
files = []
Expand All @@ -32,7 +34,7 @@ def datafiles(idir, pattern=None):

setuptools.setup(
name="ChessAnalysisPipeline",
version="0.0.3",
version=version,
author="Keara Soloway, Rolf Verberg, Valentin Kuznetsov",
author_email="",
description="CHESS analysis pipeline framework",
Expand Down

0 comments on commit edc6fd2

Please sign in to comment.