Skip to content

Use Maven Settings action to authenticate deployment #4

Use Maven Settings action to authenticate deployment

Use Maven Settings action to authenticate deployment #4

Workflow file for this run

name: Maven Deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- uses: s4u/[email protected]
with:
servers: |
[{
"id": "choco-repo",
"username": "${{ secrets.REPOSITORY_USERNAME }}",
"password": "${{ secrets.REPOSITORY_PASSWORD }}"
}]
- name: Deploy with Maven
run: mvn -B deploy
env:
MAVEN_USERNAME: ${{ secrets.REPOSITORY_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.REPOSITORY_PASSWORD }}