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
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
build:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,19 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag_name=$TAGS_ON_COMMIT" >> $GITHUB_OUTPUT
echo "✅ Version tag found for this commit: $TAGS_ON_COMMIT"

# Additional verification: check if this is the most recent tag
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ "$LATEST_TAG" = "$TAGS_ON_COMMIT" ]; then
echo "✅ Confirmed: $TAGS_ON_COMMIT is the latest tag"
else
echo "⚠️ Warning: $TAGS_ON_COMMIT is not the latest tag (latest: $LATEST_TAG)"
echo "This might indicate multiple tags in the same push"
fi
else
echo "⚠️ Version commit found but no tag points to it"
echo "Available tags:"
git tag -l | tail -5
echo "should_release=false" >> $GITHUB_OUTPUT
exit 0
fi
Expand Down Expand Up @@ -102,12 +113,35 @@ jobs:
echo "📦 Tag name: ${{ steps.version.outputs.tag_name }}"
echo "🏷️ Is tag push: ${{ steps.version.outputs.is_tag_push }}"

- name: Verify tag exists
run: |
echo "🔍 Verifying tag ${{ steps.version.outputs.tag_name }} exists..."
if git tag -l | grep -q "^${{ steps.version.outputs.tag_name }}$"; then
echo "✅ Tag ${{ steps.version.outputs.tag_name }} found locally"
else
echo "❌ Tag ${{ steps.version.outputs.tag_name }} not found locally"
echo "Available tags:"
git tag -l | head -10
exit 1
fi

# Show tag details
echo "Tag details:"
git show ${{ steps.version.outputs.tag_name }} --no-patch --format="%H %s"

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Ensure tag is pushed to remote
run: |
echo "🏷️ Ensuring tag ${{ steps.version.outputs.tag_name }} is available for GitHub release..."
# The tag should already be available from the merge, but let's make sure
git fetch origin --tags
echo "✅ Tags fetched from remote"

- name: Create Release
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'pycoupler: dynamic model coupling of LPJmL'
version: 1.6.3
version: 1.6.4
date-released: '2025-09-22'
abstract: An LPJmL-Python interface for operating LPJmL in a Python environment
and coupling it with Python models, programmes or simple programming scripts.
Expand Down