Skip to content

Commit

Permalink
Update maven-publish.yml (#9)
Browse files Browse the repository at this point in the history
-switches to ssh for push
  • Loading branch information
lopitz committed Dec 27, 2023
1 parent 7f7275f commit 3971562
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
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@v3
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
persist-credentials: true

- name: Build with Maven
run: mvn -B package --file pom.xml

Expand All @@ -53,7 +58,7 @@ jobs:
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN }}
ssh: true

- name: create tag
run: ./mvnw org.codehaus.mojo:exec-maven-plugin:1.6.0:exec -Dexec.executable="git" -Dexec.args='tag ${project.version}'
Expand All @@ -62,7 +67,7 @@ jobs:
uses: ad-m/github-push-action@master
with:
tags: true
github_token: ${{ secrets.TOKEN }}
ssh: true

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
Expand All @@ -81,4 +86,4 @@ jobs:
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN }}
ssh: true

0 comments on commit 3971562

Please sign in to comment.