Skip to content

Commit

Permalink
Update maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MBenincasa authored Sep 3, 2024
1 parent 9635d8b commit c33274f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,37 @@ on:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Configure Maven settings
run: |
mkdir -p ~/.m2
echo '<settings>
<servers>
<server>
<id>github</id>
<username>MBenincasa</username>
<password>${{ secrets.GITHUB_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -DskipTests --file pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c33274f

Please sign in to comment.