Skip to content

Commit 5a9439b

Browse files
committed
gha
1 parent 6ad68d2 commit 5a9439b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/resolve-version.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
gradle_version=$(cat gradle.properties | grep -Po '^version=\K(.+)')
2929
version=${VERSION:=gradle_version}
3030
VERSION=${VERSION/v}
31+
echo "GRADLE_VERSION=${GRADLE_VERSION}" >> $GITHUB_ENV
3132
echo "VERSION=${VERSION}" >> $GITHUB_ENV
3233
echo "::set-output name=version::${VERSION}"
3334
if [[ "$VERSION" != "$gradle_version" ]]; then
@@ -47,7 +48,7 @@ jobs:
4748
echo "SNAPSHOT_VERSION=$SNAPSHOT_VERSION" >> $GITHUB_ENV
4849
sed -Ei "s|^(version=).*\$|\\1$SNAPSHOT_VERSION|" gradle.properties
4950
- name: Commit and push SNAPSHOT
50-
if: env.DIFF_VERSION == '1'
51+
if: env.DIFF_VERSION == '1' && env.GRADLE_VERSION != env.SNAPSHOT_VERSION
5152
uses: devops-infra/action-commit-push@v0.9.0
5253
with:
5354
github_token: ${{ github.token }}

0 commit comments

Comments
 (0)