Skip to content

github actions config #2

github actions config

github actions config #2

Workflow file for this run

# This workflow will publish a Java project with Maven

Check failure on line 1 in .github/workflows/maven-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/maven-publish.yml

Invalid workflow file

(Line: 26, Col: 14): Unexpected value '', (Line: 27, Col: 9): Unexpected value 'distribution', (Line: 28, Col: 9): Unexpected value 'java-version', (Line: 29, Col: 9): Unexpected value 'cache'
# For more information see: https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-java-packages-with-maven
name: Java CI Publish with Maven
on:
pull_request:
types: [closed]
branches: [develop]
release:
types: [published]
jobs:
publish:
# Only run if releases are published or pull requests are merged,
# omit running if pull requests are closed without merging
if: github.event.pull_request.merged || github.event.action == 'published'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 25
cache: 'maven'
- name: Publish with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B deploy --file pom.xml