From 3c846889f8a3843140e81d32d0b888d86b03cdce Mon Sep 17 00:00:00 2001 From: Vignesh Kennadi Date: Mon, 30 Sep 2024 15:11:40 +0530 Subject: [PATCH] make the pipeline run only when release is created --- .github/workflows/publish.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9ea3cb04..35a18d45 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,5 @@ name: Publish on: - push: release: types: [published] @@ -31,8 +30,15 @@ jobs: - name: Configure Maven settings run: | mkdir -p ~/.m2 - cp .github/settings.xml ~/.m2/settings.xml - working-directory: Xero-Java + echo " + + + ossrh + ${{ secrets.MAVEN_USERNAME }} + ${{ secrets.MAVEN_TOKEN }} + + + " > ~/.m2/settings.xml - name: Publish to Maven run: |