Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more bugs in workflows #520

Merged
merged 2 commits into from
Nov 8, 2024
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ jobs:
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV

- name: Check for major or minor version change
id: check_major_minor_version
- name: Retrieve and strip "v" prefix if present
run: |
# Retrieve and strip "v" prefix if present
CURRENT_VERSION="${{ env.VERSION }}"
Expand All @@ -101,10 +100,16 @@ jobs:
CURRENT_MAJOR_MINOR=$(echo "$CURRENT_VERSION" | cut -d '.' -f 1-2)
LATEST_MAJOR_MINOR=$(echo "$LATEST_VERSION" | cut -d '.' -f 1-2)

# Compare versions
if [ "$CURRENT_MAJOR_MINOR" == "$LATEST_MAJOR_MINOR" ]; then
echo "VERSION_CHANGE=false" >> $GITHUB_ENV
else
echo "VERSION_CHANGE=true" >> $GITHUB_ENV
fi
shell: bash
env:
VERSION: ${{ env.VERSION }} # dynamically passed VERSION variable
LATEST_TAG: ${{ env.LATEST_TAG }} # dynamically passed LATEST_TAG variable

- name: Build PyPi package
if: github.ref == 'refs/heads/main' && env.VERSION_CHANGE == 'true'
Expand Down
Loading