Skip to content

Workflow: Change JDK distribution from 'adopt' to 'temurin' #6

Workflow: Change JDK distribution from 'adopt' to 'temurin'

Workflow: Change JDK distribution from 'adopt' to 'temurin' #6

Workflow file for this run

name: Publish JAR on tagging
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Maven build
run: mvn -B install -Ppedantic
- name: Maven package
run: mvn -B antrun:run@prepare-github-release -Ppedantic,prepare-release
- name: Read version from Maven
run: |
echo "release_version=$(mvn -q \
-Dexec.executable=echo \
-Dexec.args='${project.version}' \
--non-recursive \
org.codehaus.mojo:exec-maven-plugin:3.1.0:exec)" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: odftoolkit-${{ env.release_version }}
- name: Upload binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/**/*.*
file_glob: true
overwrite: true
body: "Support of **ODF 1.2** and >=**JDK 11**\n
\n
Detailed documentation:\n
https://tdf.github.io/odftoolkit/ReleaseNotes.html#release-${{ env.release_version }}\n
\n
Available via Maven repository:\n
https://oss.sonatype.org/content/groups/public/org/odftoolkit/\n
\n"