Skip to content

Commit 6b11e5a

Browse files
committed
Add GitHub Action for deploying Maven artifacts
1 parent 6b6a019 commit 6b11e5a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 }}

0 commit comments

Comments
 (0)