diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 4e6bf93..4fe5ae0 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -8,7 +8,6 @@ on: jobs: build: - runs-on: ubuntu-latest permissions: contents: read @@ -16,16 +15,30 @@ jobs: 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 ' + + + github + MBenincasa + ${{ secrets.GITHUB_TOKEN }} + + + ' > ~/.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 }}