File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed
Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 2424 with :
2525 distribution : ' temurin'
2626 java-version : ' 21'
27- cache : ' maven'
27+ cache : maven
28+ server-id : github
29+ settings-path : ${{ github.workspace }}
30+ token : ${{ secrets.GITHUB_TOKEN }}
2831
2932 - name : Build & Test
3033 run : mvn -B -DskipTests=false -Dmaven.test.failure.ignore=true verify
5457 run : |
5558 mvn -B -DskipTests=true -s $GITHUB_WORKSPACE/settings.xml deploy
5659
60+ - name : Publish to GitHub Packages
61+ if : startsWith(github.ref, 'refs/tags/v')
62+ env :
63+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64+ run : |
65+ # actions/setup-java (bên trên) đã tạo sẵn serverId=github dùng GITHUB_TOKEN
66+ mvn -B -DskipTests=true \
67+ -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }} \
68+ deploy
69+
5770 - name : SonarQube / SonarCloud Scan
5871 env :
5972 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN_BACKEND }}
Original file line number Diff line number Diff line change 113113 </dependencies >
114114 </dependencyManagement >
115115
116- <distributionManagement >
117- <repository >
118- <id >github</id >
119- <name >GitHub Packages</name >
120- <url >https://maven.pkg.github.com/${project.groupId} /${project.artifactId} </url >
121- </repository >
122- </distributionManagement >
123-
124116 <!-- Quản lý version plugin dùng chung -->
125117 <build >
126118 <pluginManagement >
You can’t perform that action at this time.
0 commit comments