Distribution management #26
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
name: Docker Image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
package-server-app: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: write | |
environment: production | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: maven | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Setup Maven | |
uses: stCarolas/setup-maven@v4.5 | |
with: | |
maven-version: 3.8.2 | |
- name: Package Jar | |
run: mvn -f mapmap-server/pom.xml package -Dmaven.test.skip | |
- name: Deploy to GitHub | |
run: mvn -f mapmap-server/pom.xml deploy --batch-mode -DuseGitHubPackages=true -Dmaven.test.skip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mapmap-server | |
path: mapmap-server/target/*.jar | |