-
Notifications
You must be signed in to change notification settings - Fork 57
41 lines (39 loc) · 1.52 KB
/
deployment.yml
File metadata and controls
41 lines (39 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish JAR on tagging
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]*'
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: 'adopt'
cache: maven
- name: Maven build # build, test
run: mvn -B install -Ppedantic -e --file pom.xml
- name: Maven package # package sources & create 3 ZIP for all bin, doc and src deliverables!
run: mvn -B antrun:run@prepare-github-release -Ppedantic,prepare-release -e --file pom.xml
- name: Read pom.xml to get version for new release # The following step reads the pom.xml from repo and use its version for the release
run: |
echo "release_version=$(cat pom.xml | grep -a -m 1 "<version>" | sed 's/.*<version>//p' | head -1 | sed 's/<\/version>//p' | head -1)" >> $GITHUB_ENV
- name: Upload binaries as GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/**/*.*
release_name: odftoolkit-${{ env.release_version }} # <--- Use environment variables that was created before
overwrite: true
file_glob: true
body: "Support of **ODF 1.3** 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"