Skip to content

Commit

Permalink
Create maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MBenincasa authored Sep 3, 2024
1 parent 094460b commit 9fe1630
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Java Maven Build & Publish Artifact

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -DskipTests --file pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 9fe1630

Please sign in to comment.