Skip to content

Commit ed89db3

Browse files
committed
publish only if build succeed
1 parent a9892e5 commit ed89db3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/build-and-publish.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ jobs:
3232

3333
publish-snapshot:
3434
name: Publish Snapshot to Maven Central
35+
needs: build
3536
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
3637
runs-on: ubuntu-latest
38+
3739

3840
permissions:
3941
contents: read
@@ -74,6 +76,7 @@ jobs:
7476
7577
publish:
7678
name: Publish to Maven Central
79+
needs: build
7780
if: github.event_name == 'release'
7881
runs-on: ubuntu-latest
7982

0 commit comments

Comments
 (0)