Skip to content

Commit

Permalink
chore: version increment
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Dec 10, 2024
1 parent aefc34d commit dfe3985
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,40 @@ on:


jobs:

validateVersion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Validate tag version
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
TAG_VALUE=${GITHUB_REF/refs\/tags\//}
PYTHON_VERSION=$(grep -E '\bversion\s?=\s?"[^"]+"' pyproject.toml | awk -F '"' '{print $2}')
echo "Tag version is [$TAG_VALUE], Python version is [$PYTHON_VERSION]"
if [ "$TAG_VALUE" != "$PYTHON_VERSION" ]; then
echo "Version mismatch; tag version is [$TAG_VALUE] but Python version is [$PYTHON_VERSION]" >> $GITHUB_STEP_SUMMARY
exit 1
fi
lint:
if: github.repository == 'ckan/ckanext-validation'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install requirements
run: pip install flake8 pycodestyle

- name: Check syntax
run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --extend-exclude ckan

Expand Down Expand Up @@ -164,16 +188,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate tag version
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
PYTHON_VERSION=$(grep -E "\bversion='[^']+'" setup.py | awk -F "'" '{print $2}')
echo "Tag version is [${{ steps.version.outputs.version }}], Python version is [$PYTHON_VERSION]"
if [ "${{ steps.version.outputs.version }}" != "$PYTHON_VERSION" ]; then
echo "Version mismatch; tag version is [${{ steps.version.outputs.version }}] but Python version is [$PYTHON_VERSION]" >> $GITHUB_STEP_SUMMARY
exit 1
fi
- name: Build package ${{ steps.version.outputs.reponame }} @ ${{ steps.version.outputs.version }}
run: |
pip install build
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ckanext-validation"
version = "2.0.0"
version = "2.0.1"
description = "Data description and validation for CKAN with Frictionless Data tools."
classifiers = [ "Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
Expand Down

0 comments on commit dfe3985

Please sign in to comment.