Skip to content

Commit d0fd95b

Browse files
committed
[ci] Upload to sonatype only on stable, tag release
1 parent 0d8e4af commit d0fd95b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ jobs:
3737
SONATYPE_USER: "${{ secrets.SONATYPE_USER }}"
3838
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
3939
PGP_PASSPHRASE: "${{ secrets.PGP_PASSWORD }}"
40-
run: sbt "clean;+cli/cliPack; +cli/publishSigned; sonaUpload"
40+
run: sbt "clean;+cli/cliPack; +cli/publishSigned"
41+
42+
- name: Sonatype upload (only on manual/dispatch)
43+
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
44+
env:
45+
SONATYPE_USER: "${{ secrets.SONATYPE_USER }}"
46+
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
47+
run: sbt "sonaUpload"
4148

4249
- name: Create release artifacts
4350
run: |

0 commit comments

Comments
 (0)