Skip to content

Update actions/checkout action to v4 - autoclosed #879

Update actions/checkout action to v4 - autoclosed

Update actions/checkout action to v4 - autoclosed #879

Workflow file for this run

name: Chaos Monkey Build
on: [push, pull_request]
jobs:
build:
name: "OS: ${{ matrix.os }}, Java: ${{ matrix.java }}"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java: [17]
include:
# Build additional java versions
- java: 19
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0 # need git history for spotless license header
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Spotless
run: ./mvnw spotless:check
- name: Run Maven verify
run: ./mvnw verify -B
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
deploy:
needs: build
name: "Publish snapshot artifacts"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Maven Deploy
env:
SONATYPE_USERTOKEN: ${{ secrets.SONATYPE_USERTOKEN }}
SONATYPE_USERTOKENPASSWORD: ${{ secrets.SONATYPE_USERTOKENPASSWORD }}
run: ./mvnw deploy -DskipTests --settings .settings.xml