Skip to content

Commit

Permalink
make the pipeline run only when release is created
Browse files Browse the repository at this point in the history
  • Loading branch information
Vignesh Kennadi committed Sep 30, 2024
1 parent a15f876 commit 3c84688
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Publish
on:
push:
release:
types: [published]

Expand Down Expand Up @@ -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 "<settings>
<servers>
<server>
<id>ossrh</id>
<username>${{ secrets.MAVEN_USERNAME }}</username>
<password>${{ secrets.MAVEN_TOKEN }}</password>
</server>
</servers>
</settings>" > ~/.m2/settings.xml
- name: Publish to Maven
run: |
Expand Down

0 comments on commit 3c84688

Please sign in to comment.