Skip to content

Commit b926a61

Browse files
Workflow: Change JDK distribution from 'adopt' to 'temurin'
The action .github/workflows/deployment.yml should make a GitHub release for every tagged commit being pushed.
1 parent d7e0c58 commit b926a61

File tree

1 file changed

+41
-24
lines changed

1 file changed

+41
-24
lines changed

.github/workflows/deployment.yml

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,52 @@ name: Publish JAR on tagging
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]*'
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
710

811
jobs:
912
build:
1013
runs-on: ubuntu-latest
1114
steps:
12-
- uses: actions/checkout@v3
13-
- name: Set up JDK 11
14-
uses: actions/setup-java@v3
15-
with:
16-
java-version: '11'
17-
distribution: 'adopt'
18-
cache: maven
19-
- name: Maven build # build, test
20-
run: mvn -B install -Ppedantic -e --file pom.xml
21-
- name: Maven package # package sources & create 3 ZIP for all bin, doc and src deliverables!
22-
run: mvn -B antrun:run@prepare-github-release -Ppedantic,prepare-release -e --file pom.xml
23-
- 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
24-
run: |
25-
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
26-
- name: Upload binaries as GitHub release
27-
uses: svenstaro/upload-release-action@v2
28-
with:
29-
repo_token: ${{ secrets.GITHUB_TOKEN }}
30-
file: target/release/**/*.*
31-
release_name: odftoolkit-${{ env.release_version }} # <--- Use environment variables that was created before
32-
overwrite: true
33-
file_glob: true
34-
body: "Support of **ODF 1.2** and >=**JDK 11**\n
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '11'
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- name: Maven build
25+
run: mvn -B install -Ppedantic
26+
27+
- name: Maven package
28+
run: mvn -B antrun:run@prepare-github-release -Ppedantic,prepare-release
29+
30+
- name: Read version from Maven
31+
run: |
32+
echo "release_version=$(mvn -q \
33+
-Dexec.executable=echo \
34+
-Dexec.args='${project.version}' \
35+
--non-recursive \
36+
org.codehaus.mojo:exec-maven-plugin:3.1.0:exec)" >> $GITHUB_ENV
37+
38+
- name: Create GitHub Release
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
tag_name: ${{ github.ref_name }}
42+
name: odftoolkit-${{ env.release_version }}
43+
44+
- name: Upload binaries
45+
uses: svenstaro/upload-release-action@v2
46+
with:
47+
repo_token: ${{ secrets.GITHUB_TOKEN }}
48+
file: target/release/**/*.*
49+
file_glob: true
50+
overwrite: true
51+
body: "Support of **ODF 1.2** and >=**JDK 11**\n
3552
\n
3653
Detailed documentation:\n
3754
https://tdf.github.io/odftoolkit/ReleaseNotes.html#release-${{ env.release_version }}\n

0 commit comments

Comments
 (0)