Skip to content

Commit d12a3f8

Browse files
Update CD.yml
1 parent f04dcbd commit d12a3f8

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/CD.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ jobs:
1818
package-name: shipengine
1919

2020
- uses: actions/checkout@v2.5.0
21-
21+
22+
- name: Build with Maven
23+
run: mvn clean compile -Dmaven.test.skip=true && mvn package -Dmaven.test.skip=true && mvn verify -Dmaven.test.skip=true
24+
25+
- name: Publish to GitHub Packages Apache Maven
26+
run: mvn deploy
27+
env:
28+
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
29+
2230
- name: Setup Java
2331
uses: actions/setup-java@v3.6.0
2432
with:
@@ -30,11 +38,8 @@ jobs:
3038
server-password: OSSRH_TOKEN # env variable for token in deploy
3139
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
3240
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
33-
34-
- name: Build with Maven
35-
run: mvn -B package --file pom.xml
3641

37-
- name: Publish package to Maven
42+
- name: Publish package to Maven Central
3843
run: |
3944
mvn -X --batch-mode deploy -Dmaven.test.skip=true
4045
env:

0 commit comments

Comments
 (0)