Skip to content

Commit f201b53

Browse files
committed
[CI] Attempting to fix beta channel.
1 parent 2f12016 commit f201b53

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
runs-on: ubuntu-latest
2929
outputs:
3030
mode: ${{ steps.mode.outputs.mode }}
31-
proceed: ${{ steps.guard.outputs.proceed }}
32-
beta_local_tag: ${{ steps.guard.outputs.beta_local_tag }}
31+
proceed: ${{ steps.check_changes.outputs.proceed }}
32+
beta_local_tag: ${{ steps.check_changes.outputs.beta_local_tag }}
3333
steps:
3434
- name: Determine mode
3535
id: mode
@@ -52,8 +52,12 @@ jobs:
5252
with:
5353
fetch-depth: 300
5454
fetch-tags: true
55-
ref: ${{ github.sha }}
55+
ref: ${{ github.ref }}
5656

57+
- name: reset to exact commit
58+
shell: bash
59+
run: |
60+
git reset --hard ${GITHUB_SHA}
5761
5862
- name: Check for changes since last tag
5963
id: check_changes
@@ -64,25 +68,17 @@ jobs:
6468
PROCEED="true"
6569
BETA_TAG=""
6670
67-
# Find the latest *release* tag only (X.Y.Z). Beta/rc/alpha tags are excluded.
68-
LAST_RELEASE_TAG=$(
69-
git tag --list "*" \
70-
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \
71-
| sort -V \
72-
| tail -n 1
73-
)
74-
75-
HEAD_SHA="$(git rev-parse HEAD)"
76-
77-
if [ -n "$LAST_RELEASE_TAG" ]; then
78-
RELEASE_SHA="$(git rev-list -n 1 "$LAST_RELEASE_TAG")"
79-
else
80-
RELEASE_SHA=""
81-
fi
82-
83-
if [ "$MODE" = "beta" ] && [ -n "$RELEASE_SHA" ] && [ "$HEAD_SHA" = "$RELEASE_SHA" ]; then
84-
echo "Beta skipped: HEAD equals last release tag ($LAST_RELEASE_TAG)."
71+
LAST_TAG=$(git describe --tags --abbrev=0)
72+
echo "Last tag: $LAST_TAG"
73+
CHANGED_FILES=$(git diff --name-only $LAST_TAG HEAD)
74+
if [ -z "$CHANGED_FILES" ]; then
75+
echo "No changes detected since last tag."
76+
echo "changes_detected=false" >> $GITHUB_OUTPUT
8577
PROCEED="false"
78+
else
79+
echo "Changes detected since last tag:"
80+
echo "$CHANGED_FILES"
81+
echo "changes_detected=true" >> $GITHUB_OUTPUT
8682
fi
8783
8884
# Create a date-based beta tag (local only) so packager treats the build as beta.

0 commit comments

Comments
 (0)