* Finalize 1 #51
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
# When main is updated: | |
# - Build | |
# - Deploy the artifacts to GitHub Packages | |
# - Update the dependency graph | |
name: Maven Deploy | |
on: | |
push: | |
branches: [ "main" ] | |
# Default to bash | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deploy: | |
permissions: | |
contents: write | |
packages: write | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Build and Deploy from ${{ matrix.os }} | |
run: mvn -B deploy --file pom.xml -s $GITHUB_WORKSPACE/settings.xml | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
# Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive | |
- name: Maven Dependency Tree Dependency Submission | |
uses: advanced-security/[email protected] | |