Skip to content

Fix deploy CI

Fix deploy CI #46

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
build:
runs-on: [ubuntu-latest]
strategy:
matrix:
java_version: [11, 17]
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'
cache: maven
- name: Setup dependencies
run: mvn -B clean --file pom.xml
- name: Build and tests with Maven
uses: coactions/setup-xvfb@v1
with:
run: mvn -B package --file pom.xml
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
deploy:
runs-on: [ubuntu-latest]
java_version: [17]

Check failure on line 49 in .github/workflows/CI.yml

View workflow run for this annotation

GitHub Actions / Java CI with Maven

Invalid workflow file

The workflow is not valid. .github/workflows/CI.yml (Line: 49, Col: 5): Unexpected value 'java_version'
if: github.ref == 'refs/heads/main'
steps:
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}