File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
2+ # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+ name : Deploy
4+
5+ on :
6+ workflow_dispatch
7+
8+ jobs :
9+ build :
10+
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Set up JDK 17
19+ uses : actions/setup-java@v4
20+ with :
21+ java-version : ' 17'
22+ distribution : ' temurin'
23+ server-id : github
24+ settings-path : ${{ github.workspace }}
25+
26+ - name : Build with Maven
27+ run : ./mvnw --batch-mode --no-transfer-progress package --file pom.xml
28+
29+ - name : Publish to GitHub Packages Apache Maven
30+ run : ./mvnw --batch-mode deploy -s $GITHUB_WORKSPACE/settings.xml
31+ env :
32+ GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments