Maven Build Package and Publish #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow buils mapmap-server JAR files and publish them. Also upload the artifact so other actions can use it. | |
name: Maven Build Package and Publish | |
on: | |
workflow_dispatch | |
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' | |
cache: maven | |
server-id: github | |
settings-path: ${{ github.workspace }}/mapmap-server | |
- name: Build with Maven | |
run: mvn -B package --file mapmap-server/pom.xml -Dmaven.test.skip | |
- name: Publish to GitHub Packages Apache Maven | |
run: mvn deploy --file mapmap-server/pom.xml -s $GITHUB_WORKSPACE/mapmap-server/settings.xml -Dmaven.test.skip | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mapmap-server | |
path: mapmap-server/target/*.jar |