Skip to content

Publish Maven Package to GitHub Packages #50

Publish Maven Package to GitHub Packages

Publish Maven Package to GitHub Packages #50

name: Publish Maven Package to GitHub Packages
on:
workflow_run:
workflows: ["Generate Java Fabric8 Model From CRD"]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
ref: '${{ github.event.workflow_run.head_branch }}'
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}