-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (39 loc) · 1.21 KB
/
maven-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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]