From d567e4c504852503ef7da081a9b791683dee6e0d Mon Sep 17 00:00:00 2001 From: jnnsbrr Date: Wed, 24 Sep 2025 12:44:12 +0200 Subject: [PATCH 1/4] improve workflow for actual releases --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac1b581..14def83 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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: From 53d53294a584454fae1dea8b8cb8537d46609998 Mon Sep 17 00:00:00 2001 From: jnnsbrr Date: Wed, 24 Sep 2025 12:44:22 +0200 Subject: [PATCH 2/4] Version 1.6.4 --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 10154e5..27c059e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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. From c576ec7fefbd46aca730fd219a7d1688fac0dbbc Mon Sep 17 00:00:00 2001 From: jnnsbrr Date: Wed, 24 Sep 2025 12:48:52 +0200 Subject: [PATCH 3/4] improve workflow for actual releases --- .github/workflows/check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 064b0c5..8ba5bf5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,9 +2,7 @@ name: check on: push: - branches: [main, master] pull_request: - branches: [main, master] jobs: build: From dc3410aeacdc98b4df674b46c4299db2aa92f000 Mon Sep 17 00:00:00 2001 From: jnnsbrr Date: Wed, 24 Sep 2025 12:51:47 +0200 Subject: [PATCH 4/4] improve workflow for actual releases --- .github/workflows/check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8ba5bf5..0596105 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,6 +2,7 @@ name: check on: push: + branches: [main, master] pull_request: jobs: