From 12ae55daa6a16e34eb98376799908d6379e3fd2e Mon Sep 17 00:00:00 2001 From: Wonderson Chideya Date: Mon, 29 Apr 2024 17:41:37 +0100 Subject: [PATCH 1/2] Update maven-publish.yml --- .github/workflows/maven-publish.yml | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index e669f16..b18f099 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -17,19 +17,22 @@ jobs: packages: write steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - 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 + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + 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 + server-username: GITHUB_USER_REF # env variable name for username + server-password: GITHUB_TOKEN_REF # env variable name for GitHub Personal Access Token - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Build with Maven + run: mvn -B package --file pom.xml - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} + GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} From 42fd4870fe41a2103712a4fddc215582558220cf Mon Sep 17 00:00:00 2001 From: Wonderson Chideya Date: Mon, 29 Apr 2024 17:48:10 +0100 Subject: [PATCH 2/2] Update maven-publish.yml --- .github/workflows/maven-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index b18f099..2a9c419 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -6,7 +6,7 @@ name: Maven Package on: push: branches: - - master + - opt-lock jobs: build: