diff --git a/.github/workflows/deploySettings.xml b/.github/workflows/deploySettings.xml new file mode 100644 index 00000000..1e6213b2 --- /dev/null +++ b/.github/workflows/deploySettings.xml @@ -0,0 +1,37 @@ + + + + github + + + + + github + + + central + https://repo1.maven.org/maven2 + + + github + https://maven.pkg.github.com/OWNER/REPOSITORY + + true + + + + + + + + + github + ${github.user} + ${github.token} + + + + diff --git a/.github/workflows/releaseToGithubPackages.yml b/.github/workflows/releaseToGithubPackages.yml index 4386107a..fa42270e 100644 --- a/.github/workflows/releaseToGithubPackages.yml +++ b/.github/workflows/releaseToGithubPackages.yml @@ -14,7 +14,10 @@ jobs: with: java-version: '11' distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file - name: Publish package - run: mvn --batch-mode deploy + run: ./mvnw -s "${{ github.workspace }}/scriptsAndTools/internalOrCiOnly/deploySettings.xml" deploy -Dgithub.user=$GITHUB_USER -Dgithub.token=$GITHUB_TOKEN env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_USER: ${{ secrets.MAVEN_REPO_USER }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}