Skip to content

GITHUB_TOKEN removed #434

GITHUB_TOKEN removed

GITHUB_TOKEN removed #434

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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
schedule:
# each first day of month
- cron: "0 0 1 * *"
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [published]
push:
tags:
- '*'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 11, 15 ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'true'
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent package --file pom.xml
- name: Codecov
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
- name: Create Release
id: create_release
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: "target/*.jar"
makeLatest: true