Skip to content

Commit

Permalink
Fix: get proper last tag so nightlies build only when changes detected (
Browse files Browse the repository at this point in the history
#168)

* get last tag even if current commit has multiple tags

* sort by -creatordate
  • Loading branch information
steezeburger authored Oct 29, 2024
1 parent c58fd61 commit ebf48a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ jobs:
id: check_changes
run: |
git fetch --tags
LAST_RELEASE=$(git tag -l --sort=-version:refname | head -n 1)
if [ -z "$LAST_RELEASE" ]; then
LAST_TAG=$(git tag -l --sort=-creatordate | head -n 1)
if [ -z "$LAST_TAG" ]; then
echo "No previous release found. Proceeding with release."
echo "should_release=true" >> $GITHUB_OUTPUT
else
# check for changes in modules/ directory
CHANGES=$(git diff --name-only $LAST_RELEASE..HEAD -- modules)
CHANGES=$(git diff --name-only $LAST_TAG..HEAD -- modules)
if [ -n "$CHANGES" ]; then
echo "Changes detected in modules/ since last release. Proceeding with release."
echo "should_release=true" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit ebf48a2

Please sign in to comment.