Skip to content

Github Actions Artifact Publishing #1

Github Actions Artifact Publishing

Github Actions Artifact Publishing #1

name: Publish Java Package
on:
# commented out for testing
# release:
# types: [created]
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages
run: mvn --batch-mode -Dgithub_organization=${{ github.repository_owner }} deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}