Update main.yml

This commit is contained in:
Nicolas Héron 2025-01-17 15:06:00 +01:00 committed by GitHub
commit 4497b7a76c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,8 +26,16 @@ jobs:
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven - name: Cache the Maven packages to speed up build
run: mvn -B package --file pom.xml uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.8.1
- name: Publish to GitHub Packages Apache Maven - name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml