File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 44 # Trigger on push to main (usually for Snapshots)
55 push :
66 branches : [ "main" ]
7+ tags :
8+ - ' v*'
79 # Trigger when a Release is published in GitHub UI
810 release :
911 types : [ published ]
12+ workflow_dispatch :
1013
1114jobs :
1215 publish :
1316 runs-on : ubuntu-latest
1417 permissions :
15- contents : read
18+ contents : write
1619 packages : write
1720
1821 steps :
@@ -39,10 +42,21 @@ jobs:
3942 MAVEN_PASSWORD : ${{ secrets.CENTRAL_PASSWORD }}
4043 MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
4144 run : |
42- if [[ "${{ github.event_name }}" == "release" ]]; then
43- # For releases: Sign artifacts and use the central portal
44- mvn deploy -DskipTests -P release -ntp
45+ if [[ "${{ github.ref }}" == refs/tags/v* ]] || [[ "${{ github. event_name }}" == "release" ]]; then
46+ # For releases/tags : Sign artifacts and use the central portal
47+ mvn deploy -DskipTests -P release,uberjar -ntp
4548 else
46- # For snapshots: Force deployment to the Sonatype snapshot repo with the release profile for sources/javadocs
49+ # For snapshots: Force deployment to the Sonatype snapshot repo
4750 mvn deploy -DskipTests -P release -ntp -DaltSnapshotDeploymentRepository=sonatype-central::default::https://central.sonatype.com/repository/maven-snapshots/
4851 fi
52+
53+ - name : Create/Update GitHub Release
54+ if : startsWith(github.ref, 'refs/tags/v')
55+ uses : softprops/action-gh-release@v2
56+ with :
57+ files : |
58+ target/gemini-java-client-uber-*.jar
59+ draft : false
60+ prerelease : false
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments