Skip to content

Commit be2475a

Browse files
authored
fix(ci): close and release only if not snapshot (#493)
1 parent 667d7b9 commit be2475a

File tree

1 file changed

+5
-1
lines changed
  • clients/algoliasearch-client-java-2/.github/workflows

1 file changed

+5
-1
lines changed

clients/algoliasearch-client-java-2/.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
- name: Upload Artifacts
3333
run: ./gradlew clean publish --no-parallel --stacktrace
3434

35+
- name: Check snapshot
36+
id: check-snapshot
37+
run: cat ./gradle.properties | grep 'VERSION_NAME=.*-SNAPSHOT'
38+
3539
- name: Release Artifacts
36-
if: ! cat ./gradle.properties | grep 'VERSION_NAME=.*-SNAPSHOT'
40+
if: ${{ steps.check-snapshot.exitcode == 1 }}
3741
run: ./gradlew closeAndReleaseRepository

0 commit comments

Comments
 (0)