Skip to content

Update workflow to build JAR and add release workflow #11

Update workflow to build JAR and add release workflow

Update workflow to build JAR and add release workflow #11

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

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

View workflow run for this annotation

GitHub Actions / .github/workflows/maven.yml

Invalid workflow file

(Line: 37, Col: 16): Unexpected symbol: '‘**/pom'. Located at position 11 within expression: hashFiles(‘**/pom.xml’)
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload JAR as artifact
uses: actions/upload-artifact@v3
with:
name: TodoApp-jar
path: target/*.jar
- name: Cache
uses: actions/cache@v3.0.7
with:
path: /home/runner/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles(‘**/pom.xml’) }}