Skip to content

Commit d4263ea

Browse files
committed
[GH-A] Always deploy to OSSRH + deploy on GH Packages on tag
1 parent 9ddd858 commit d4263ea

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/maven.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ jobs:
3939
- name: Build with Maven
4040
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
4141
run: mvn clean test -Pdebug -B -U -Dgpg.skip -Dmaven.javadoc.skip=true
42-
- name: Deploy with Maven
43-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
44-
run: |
45-
mvn deploy --settings .maven.xml -B -U -Possrh
46-
mvn deploy --settings .maven.xml -B -U -Pgithub
42+
- name: Deploy with Maven to OSSRH
43+
run: mvn deploy --settings .maven.xml -B -U -Possrh
4744
env:
4845
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
4946
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
5047
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
48+
- name: Deploy with Maven to GitHub packages
49+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
50+
run: mvn deploy --settings .maven.xml -B -U -Pgithub
51+
env:
52+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
5153
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5254
- name: Create release
5355
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

0 commit comments

Comments
 (0)