File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+ # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+
4+ name : Maven Package
5+
6+ on :
7+ release :
8+ types : [created]
9+
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Set up JDK 8
23+ uses : actions/setup-java@v3
24+ with :
25+ java-version : ' 8'
26+ distribution : ' temurin'
27+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
28+ settings-path : ${{ github.workspace }} # location for the settings.xml file
29+
30+ - name : Build with Maven
31+ working-directory : ./packages/java
32+ run : mvn -B package --file pom.xml
33+
34+ - name : Publish to GitHub Packages Apache Maven
35+ working-directory : ./packages/java
36+ run : mvn deploy -s $GITHUB_WORKSPACE/packages/java/settings.xml
37+ env :
38+ GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments