From f2241f21bb57fce319b7f0c3a2d909d44a6d6846 Mon Sep 17 00:00:00 2001 From: Rob Tjalma Date: Tue, 7 Sep 2021 23:07:35 +0200 Subject: [PATCH] Added Github Packages authentication for releasing Signed-off-by: Rob Tjalma --- .github/workflows/release-project.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index 5373aa0..ba49082 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -26,11 +26,16 @@ jobs: with: distribution: 'zulu' java-version: '11' + - name: Create custom Maven Settings.xml + uses: whelk-io/maven-settings-xml-action@v18 + with: + output_file: custom_maven_settings.xml + servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' - name: Set version with Maven run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy with Maven to GitHub Packages - run: ./mvnw -B -Prelease clean deploy + run: ./mvnw -B -s custom_maven_settings.xml -Prelease clean deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}