Skip to content

Bump rexml from 3.2.5 to 3.3.3 in /thymeleaf-layout-dialect-docs #132

Bump rexml from 3.2.5 to 3.3.3 in /thymeleaf-layout-dialect-docs

Bump rexml from 3.2.5 to 3.3.3 in /thymeleaf-layout-dialect-docs #132

Workflow file for this run

name: build
on:
push:
pull_request:
workflow_dispatch:
inputs:
java-version:
type: choice
description: java version to deploy to sonatype snapshot repository
required: false
options:
- skip
- '8'
- '11'
- '17'
jobs:
build:
name: build with ${{ matrix.java-distribution }} jdk ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
matrix:
java-distribution:
- temurin
- zulu
java-version:
- 8
- 11
- 17
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
env:
cache-name: maven-dependencies
with:
path: ~/.m2
key: ${{ env.cache-name }}-${{ github.workflow }}-${{ hashFiles('.github/**', '**/pom.xml') }}
restore-keys: |
${{ env.cache-name }}-${{ github.workflow }}-
${{ env.cache-name }}-
- uses: actions/setup-java@v3
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}
- name: mvnw install
run: ./mvnw -B --color=always clean install
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Before Cache
run: .github/functions.sh purge_artifacts
deploy:
name: deploy
runs-on: ubuntu-latest
if: |
github.event_name == 'push' && github.repository == 'zhanhb/thymeleaf-layout-dialect' && github.ref_name == 'main' ||
github.event_name == 'workflow_dispatch' && github.event.inputs.java-version > 0
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
env:
cache-name: maven-dependencies
with:
path: ~/.m2
key: ${{ env.cache-name }}-${{ github.workflow }}-${{ hashFiles('.github/**', '**/pom.xml') }}-deploy
restore-keys: |
${{ env.cache-name }}-${{ github.workflow }}-${{ hashFiles('.github/**', '**/pom.xml') }}
${{ env.cache-name }}-${{ github.workflow }}-
${{ env.cache-name }}-
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ github.event.inputs.java-version || 11 }}
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Maven Deploy
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
version="$(./mvnw -B -N help:evaluate -Dexpression=project.version -q -DforceStdout)"
case "$version" in
*-SNAPSHOT) ./mvnw -B --color=always deploy ;;
*) printf '\e[31m%s\e[m\n' "skip deploy version '$version'" ;;
esac
- name: Before Cache
run: .github/functions.sh purge_artifacts