Skip to content

Commit 8959e4b

Browse files
authored
Merge pull request #160 from xdev-software/develop
Release v2.0.0
2 parents 040443a + a546844 commit 8959e4b

File tree

33 files changed

+1463
-575
lines changed

33 files changed

+1463
-575
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: daily
7+
# Run it at a specific time so that we don't get emails all day long
8+
time: "00:00"
79
open-pull-requests-limit: 10
810
ignore:
911
- dependency-name: "*"
@@ -15,4 +17,10 @@ updates:
1517
directory: "/"
1618
schedule:
1719
interval: daily
20+
# Run it at a specific time so that we don't get emails all day long
21+
time: "00:00"
1822
open-pull-requests-limit: 10
23+
ignore:
24+
- dependency-name: "org.eclipse.jetty:jetty-maven-plugin"
25+
# Version 11+ requires jakarta.* instead of javax.* (see https://www.eclipse.org/jetty/download.php#what-jetty-version)
26+
versions: ">=11.0.0"

.github/workflows/checkBuild.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Check Build
2+
23
on:
34
workflow_dispatch:
45
push:
@@ -10,26 +11,28 @@ on:
1011
paths-ignore:
1112
- '**.md'
1213

14+
env:
15+
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
16+
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
17+
1318
jobs:
1419
build:
1520
runs-on: ubuntu-latest
1621

22+
strategy:
23+
matrix:
24+
java: [11, 17]
25+
distribution: [temurin]
26+
1727
steps:
18-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
1929

20-
- name: Set up JDK 8
21-
uses: actions/setup-java@v2
22-
with:
23-
java-version: '8'
24-
distribution: 'adopt'
25-
26-
- name: Cache local Maven repository
27-
uses: actions/cache@v2
30+
- name: Set up JDK
31+
uses: actions/setup-java@v3
2832
with:
29-
path: ~/.m2/repository
30-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31-
restore-keys: |
32-
${{ runner.os }}-maven-
33+
distribution: ${{ matrix.distribution }}
34+
java-version: ${{ matrix.java }}
35+
cache: 'maven'
3336

3437
- name: Build with Maven
3538
run: mvn -B clean package -Pproduction
@@ -53,8 +56,8 @@ jobs:
5356
fi
5457
5558
- name: Upload demo files
56-
uses: actions/upload-artifact@v2
59+
uses: actions/upload-artifact@v3
5760
with:
58-
name: demo-files
59-
path: vaadin-maps-leaflet-flow-demo/target/vaadin-maps-leaflet-flow-demo.war
61+
name: demo-files-java-${{ matrix.java }}
62+
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.war
6063
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ on:
44
push:
55
branches: [ master ]
66

7+
env:
8+
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
9+
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
10+
711
jobs:
812
check_code: # Validates the code (see develop.yml)
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1216

13-
- name: Set up JDK 8
14-
uses: actions/setup-java@v2
17+
- name: Set up JDK
18+
uses: actions/setup-java@v3
1519
with:
16-
java-version: '8'
17-
distribution: 'adopt'
20+
java-version: '11'
21+
distribution: 'temurin'
1822

1923
- name: Cache local Maven repository
20-
uses: actions/cache@v2
24+
uses: actions/cache@v3
2125
with:
2226
path: ~/.m2/repository
2327
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -51,7 +55,7 @@ jobs:
5155
outputs:
5256
upload_url: ${{ steps.create_release.outputs.upload_url }}
5357
steps:
54-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v3
5559

5660
- name: Configure Git
5761
run: |
@@ -63,17 +67,19 @@ jobs:
6367

6468
- name: Un-SNAP demo
6569
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
66-
working-directory: vaadin-maps-leaflet-flow-demo
70+
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
6771

6872
- name: Un-SNAP
6973
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
70-
working-directory: vaadin-maps-leaflet-flow
74+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
7175

7276
- name: Get version
7377
id: version
7478
run: |
75-
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
76-
working-directory: vaadin-maps-leaflet-flow
79+
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
80+
echo "::set-output name=release::$version"
81+
echo "::set-output name=releasenumber::${version//[!0-9]/}"
82+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
7783

7884
- name: Commit and Push
7985
run: |
@@ -93,12 +99,15 @@ jobs:
9399
release_name: v${{ steps.version.outputs.release }}
94100
commitish: master
95101
body: |
102+
## [Changelog](https://github.com/xdev-software/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }})
103+
See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/xdev-software/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information.
104+
96105
## Installation
97106
Add the following lines to your pom:
98107
```XML
99108
<dependency>
100109
<groupId>com.xdev-software</groupId>
101-
<artifactId>vaadin-maps-leaflet-flow</artifactId>
110+
<artifactId>${{ env.PRIMARY_MAVEN_MODULE }}</artifactId>
102111
<version>${{ steps.version.outputs.release }}</version>
103112
</dependency>
104113
```
@@ -109,19 +118,19 @@ jobs:
109118
runs-on: ubuntu-latest
110119
needs: [prepare_release]
111120
steps:
112-
- uses: actions/checkout@v2
121+
- uses: actions/checkout@v3
113122

114123
- name: Init Git and pull
115124
run: |
116125
git config --global user.email "[email protected]"
117126
git config --global user.name "GitHub Actions"
118127
git pull
119128
120-
- name: Set up JDK 8 Apache Maven Central
121-
uses: actions/setup-java@v2
129+
- name: Set up JDK Apache Maven Central
130+
uses: actions/setup-java@v3
122131
with: # running setup-java again overwrites the settings.xml
123-
java-version: '8'
124-
distribution: 'adopt'
132+
java-version: '11'
133+
distribution: 'temurin'
125134
server-id: ossrh
126135
server-username: MAVEN_CENTRAL_USERNAME
127136
server-password: MAVEN_CENTRAL_TOKEN
@@ -134,59 +143,59 @@ jobs:
134143
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
135144
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
136145
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
137-
working-directory: vaadin-maps-leaflet-flow
146+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
138147

139148
build_directory: # Build a ZIP that can be uploaded to Vaadin Directory
140149
runs-on: ubuntu-latest
141150
needs: [prepare_release]
142151
steps:
143-
- uses: actions/checkout@v2
152+
- uses: actions/checkout@v3
144153

145154
- name: Init Git and pull
146155
run: |
147156
git config --global user.email "[email protected]"
148157
git config --global user.name "GitHub Actions"
149158
git pull
150159
151-
- name: Set up JDK 8
152-
uses: actions/setup-java@v2
160+
- name: Set up JDK
161+
uses: actions/setup-java@v3
153162
with:
154-
java-version: '8'
155-
distribution: 'adopt'
163+
java-version: '11'
164+
distribution: 'temurin'
156165

157166
- name: Build for Vaadin Directory
158167
run: mvn -B install -Pdirectory
159-
working-directory: vaadin-maps-leaflet-flow
168+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
160169

161170
- name: Upload asset
162-
uses: actions/upload-artifact@v2
171+
uses: actions/upload-artifact@v3
163172
with:
164173
name: vaadin-directory-files
165-
path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-*.zip
174+
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/${{ env.PRIMARY_MAVEN_MODULE }}-*.zip
166175
if-no-files-found: error
167176

168177
- name: Get version
169178
id: version
170179
run: |
171180
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
172-
working-directory: vaadin-maps-leaflet-flow
181+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
173182

174183
- name: Upload Release Asset
175184
uses: actions/upload-release-asset@v1
176185
env:
177186
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
178187
with:
179188
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
180-
asset_path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
181-
asset_name: vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
189+
asset_path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/${{ env.PRIMARY_MAVEN_MODULE }}-${{ steps.version.outputs.release }}.zip
190+
asset_name: ${{ env.PRIMARY_MAVEN_MODULE }}-${{ steps.version.outputs.release }}.zip
182191
asset_content_type: application/zip
183192

184193
publish-pages:
185194
name: Publish dependencies and licenses to github pages
186195
runs-on: ubuntu-latest
187196
needs: [prepare_release]
188197
steps:
189-
- uses: actions/checkout@v2
198+
- uses: actions/checkout@v3
190199

191200
- name: Init Git and pull
192201
run: |
@@ -195,34 +204,27 @@ jobs:
195204
git pull
196205
197206
- name: Setup - Java
198-
uses: actions/setup-java@v2
199-
with:
200-
java-version: '8'
201-
distribution: 'adopt'
202-
203-
- name: Restore - Maven Cache
204-
uses: actions/cache@v1
207+
uses: actions/setup-java@v3
205208
with:
206-
path: ~/.m2/repository
207-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
208-
restore-keys: |
209-
${{ runner.os }}-maven-:
209+
java-version: '11'
210+
distribution: 'temurin'
211+
cache: 'maven'
210212

211213
- name: Build dependencies/licenses files
212214
run: mvn -B project-info-reports:dependencies
213-
working-directory: vaadin-maps-leaflet-flow
215+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
214216

215217
- name: Upload licenses - Upload Artifact
216-
uses: actions/upload-artifact@v2
218+
uses: actions/upload-artifact@v3
217219
with:
218220
name: dependencies-licenses
219-
path: vaadin-maps-leaflet-flow/target/site
221+
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/site
220222

221223
- name: Generate docs/dependencies dir
222224
run: mkdir -p docs/dependencies
223225

224226
- name: Move built files into docs/dependencies
225-
run: mv vaadin-maps-leaflet-flow/target/site/* docs/dependencies
227+
run: mv ${{ env.PRIMARY_MAVEN_MODULE }}/target/site/* docs/dependencies
226228

227229
- name: Rename dependencies.html to index.html
228230
working-directory: docs/dependencies
@@ -247,7 +249,7 @@ jobs:
247249
runs-on: ubuntu-latest
248250
needs: [publish_central, build_directory]
249251
steps:
250-
- uses: actions/checkout@v2
252+
- uses: actions/checkout@v3
251253

252254
- name: Init Git and pull
253255
run: |
@@ -260,11 +262,11 @@ jobs:
260262

261263
- name: Inc Version and SNAP demo
262264
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
263-
working-directory: vaadin-maps-leaflet-flow-demo
265+
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
264266

265267
- name: Inc Version and SNAP
266268
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
267-
working-directory: vaadin-maps-leaflet-flow
269+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
268270

269271
- name: Git Commit and Push
270272
run: |

.github/workflows/test-deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
8+
9+
jobs:
10+
publish_central: # Publish the code to central
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up JDK OSSRH
16+
uses: actions/setup-java@v3
17+
with: # running setup-java again overwrites the settings.xml
18+
distribution: 'temurin'
19+
java-version: '11'
20+
server-id: ossrh
21+
server-username: MAVEN_CENTRAL_USERNAME
22+
server-password: MAVEN_CENTRAL_TOKEN
23+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
24+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
25+
26+
- name: Publish to OSSRH
27+
run: mvn -B deploy -Possrh
28+
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
29+
env:
30+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
31+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
32+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)