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
30 changes: 30 additions & 0 deletions .github/actions/verify-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Verify Version
description: Verify LAST_VERSION matches pyproject.toml and __init__.py

inputs:
expected:
description: Expected version to check against (defaults to __init__.py version)
required: false
default: ""

runs:
using: composite
steps:
- name: 🔍 Verify version
shell: bash
run: |
EXPECTED="${{ inputs.expected }}"
EXPECTED="${EXPECTED#v}"
if [ -z "$EXPECTED" ]; then
EXPECTED=$(grep -m1 '^__version__ = ' dotflow/__init__.py | sed 's/^__version__ = "\(.*\)"/\1/')
fi

echo "Expected version: $EXPECTED"
echo "LAST_VERSION: $(cat LAST_VERSION)"
echo "pyproject.toml: $(grep '^version = ' pyproject.toml | head -1)"
echo "__init__.py: $(grep '^__version__ = ' dotflow/__init__.py)"

if [ "$(cat LAST_VERSION)" != "$EXPECTED" ]; then
echo "ERROR: Version mismatch!"
exit 1
fi
3 changes: 3 additions & 0 deletions .github/workflows/python-publish-pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: 🔍 Verify version
uses: ./.github/actions/verify-version

- name: 📦 Build Package
uses: ./.github/actions/build-package
with:
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,9 @@ jobs:
git pull origin ${{ steps.get_branch_deploy.outputs.branch }}

- name: 🔍 Verify version
run: |
EXPECTED="${{ github.event.release.tag_name }}"
EXPECTED="${EXPECTED#v}"
echo "Expected version: $EXPECTED"
echo "LAST_VERSION: $(cat LAST_VERSION)"
echo "pyproject.toml: $(grep '^version = ' pyproject.toml | head -1)"
echo "__init__.py: $(grep '^__version__ = ' dotflow/__init__.py)"

if [ "$(cat LAST_VERSION)" != "$EXPECTED" ]; then
echo "ERROR: Version mismatch!"
exit 1
fi
uses: ./.github/actions/verify-version
with:
expected: ${{ github.event.release.tag_name }}

- name: 📦 Build Package
uses: ./.github/actions/build-package
Expand Down
5 changes: 5 additions & 0 deletions docs/nav/development/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

## v1.0.1

- [📦 PyPI - Build 1.0.1](https://test.pypi.org/project/dotflow/1.0.1)
- [⚠️ Security: Bump vulnerable transitive deps flagged by Dependabot (#300)](https://github.com/dotflow-io/dotflow/pull/301)

## v1.0.0

- [📦 PyPI - Build 1.0.0](https://test.pypi.org/project/dotflow/1.0.0)
Expand Down
Loading
Loading