Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

Commit c2d9a63

Browse files
authored
Merge pull request #5 from xdev-software/develop
v1.0.0 - Inital release
2 parents f59d973 + 3df92ef commit c2d9a63

File tree

7 files changed

+372
-7
lines changed

7 files changed

+372
-7
lines changed

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
ignore:
9+
- dependency-name: "*"
10+
# GitHub actions are using git tags (v1 = v1.2 = v1.2.3) which should be compatible until a major change is performed
11+
update-types:
12+
- "version-update:semver-minor"
13+
- "version-update:semver-patch"
14+
- package-ecosystem: maven
15+
directory: "/"
16+
schedule:
17+
interval: daily
18+
open-pull-requests-limit: 10
19+
ignore:
20+
- dependency-name: "com.vaadin:vaadin-bom"
21+
versions: ">=15.0.0"
22+
- dependency-name: "org.eclipse.jetty:jetty-maven-plugin"
23+
versions: ">=10.0.0"

.github/workflows/checkBuild.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Check Build
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches: [ develop ]
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
branches: [ develop ]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
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
28+
with:
29+
path: ~/.m2/repository
30+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+
restore-keys: |
32+
${{ runner.os }}-maven-
33+
34+
- name: Build with Maven
35+
run: mvn -B clean package -Pproduction
36+
37+
- name: Check for uncommited changes
38+
run: |
39+
if [[ "$(git status --porcelain)" != "" ]]; then
40+
echo ----------------------------------------
41+
echo git status
42+
echo ----------------------------------------
43+
git status
44+
echo ----------------------------------------
45+
echo git diff
46+
echo ----------------------------------------
47+
git diff
48+
echo ----------------------------------------
49+
echo Troubleshooting
50+
echo ----------------------------------------
51+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package -Pproduction"
52+
exit 1
53+
fi
54+
55+
- name: Upload demo files
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: demo-files
59+
path: vaadin-chip-combobox-demo/target/vaadin-chip-combobox-demo.war
60+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
check_code: # Validates the code (see develop.yml)
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up JDK 8
14+
uses: actions/setup-java@v2
15+
with:
16+
java-version: '8'
17+
distribution: 'adopt'
18+
19+
- name: Cache local Maven repository
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: |
25+
${{ runner.os }}-maven-
26+
27+
- name: Build with Maven
28+
run: mvn -B clean package -Pproduction
29+
30+
- name: Check for uncommited changes
31+
run: |
32+
if [[ "$(git status --porcelain)" != "" ]]; then
33+
echo ----------------------------------------
34+
echo git status
35+
echo ----------------------------------------
36+
git status
37+
echo ----------------------------------------
38+
echo git diff
39+
echo ----------------------------------------
40+
git diff
41+
echo ----------------------------------------
42+
echo Troubleshooting
43+
echo ----------------------------------------
44+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package -Pproduction"
45+
exit 1
46+
fi
47+
48+
prepare_release:
49+
runs-on: ubuntu-latest
50+
needs: [check_code]
51+
outputs:
52+
upload_url: ${{ steps.create_release.outputs.upload_url }}
53+
steps:
54+
- uses: actions/checkout@v2
55+
56+
- name: Configure Git
57+
run: |
58+
git config --global user.email "actions@github.com"
59+
git config --global user.name "GitHub Actions"
60+
61+
- name: Un-SNAP root
62+
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
63+
64+
- name: Un-SNAP demo
65+
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
66+
working-directory: vaadin-chip-combobox-demo
67+
68+
- name: Un-SNAP
69+
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
70+
working-directory: vaadin-chip-combobox
71+
72+
- name: Get version
73+
id: version
74+
run: |
75+
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
76+
working-directory: vaadin-chip-combobox
77+
78+
- name: Commit and Push
79+
run: |
80+
git add -A
81+
git commit -m "Release ${{ steps.version.outputs.release }}"
82+
git push origin
83+
git tag v${{ steps.version.outputs.release }}
84+
git push origin --tags
85+
86+
- name: Create Release
87+
id: create_release
88+
uses: actions/create-release@v1
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
with:
92+
tag_name: v${{ steps.version.outputs.release }}
93+
release_name: v${{ steps.version.outputs.release }}
94+
commitish: master
95+
body: |
96+
## Installation
97+
Add the following lines to your pom:
98+
```XML
99+
<dependency>
100+
<groupId>com.xdev-software</groupId>
101+
<artifactId>vaadin-chip-combobox</artifactId>
102+
<version>${{ steps.version.outputs.release }}</version>
103+
</dependency>
104+
```
105+
draft: false
106+
prerelease: false
107+
108+
publish_central: # Publish the code to central
109+
runs-on: ubuntu-latest
110+
needs: [prepare_release]
111+
steps:
112+
- uses: actions/checkout@v2
113+
114+
- name: Init Git and pull
115+
run: |
116+
git config --global user.email "actions@github.com"
117+
git config --global user.name "GitHub Actions"
118+
git pull
119+
120+
- name: Set up JDK 8 Apache Maven Central
121+
uses: actions/setup-java@v2
122+
with: # running setup-java again overwrites the settings.xml
123+
java-version: '8'
124+
distribution: 'adopt'
125+
server-id: ossrh
126+
server-username: MAVEN_CENTRAL_USERNAME
127+
server-password: MAVEN_CENTRAL_TOKEN
128+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
129+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
130+
131+
- name: Publish to Apache Maven Central
132+
run: mvn -B deploy -Possrh
133+
env:
134+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
135+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
136+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
137+
working-directory: vaadin-chip-combobox
138+
139+
build_directory: # Build a ZIP that can be uploaded to Vaadin Directory
140+
runs-on: ubuntu-latest
141+
needs: [prepare_release]
142+
steps:
143+
- uses: actions/checkout@v2
144+
145+
- name: Init Git and pull
146+
run: |
147+
git config --global user.email "actions@github.com"
148+
git config --global user.name "GitHub Actions"
149+
git pull
150+
151+
- name: Set up JDK 8
152+
uses: actions/setup-java@v2
153+
with:
154+
java-version: '8'
155+
distribution: 'adopt'
156+
157+
- name: Build for Vaadin Directory
158+
run: mvn -B install -Pdirectory
159+
working-directory: vaadin-chip-combobox
160+
161+
- name: Upload asset
162+
uses: actions/upload-artifact@v2
163+
with:
164+
name: vaadin-directory-files
165+
path: vaadin-chip-combobox/target/vaadin-chip-combobox-*.zip
166+
if-no-files-found: error
167+
168+
- name: Get version
169+
id: version
170+
run: |
171+
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
172+
working-directory: vaadin-chip-combobox
173+
174+
- name: Upload Release Asset
175+
uses: actions/upload-release-asset@v1
176+
env:
177+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
178+
with:
179+
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
180+
asset_path: vaadin-chip-combobox/target/vaadin-chip-combobox-${{ steps.version.outputs.release }}.zip
181+
asset_name: vaadin-chip-combobox-${{ steps.version.outputs.release }}.zip
182+
asset_content_type: application/zip
183+
184+
publish-pages:
185+
name: Publish dependencies and licenses to github pages
186+
runs-on: ubuntu-latest
187+
needs: [prepare_release]
188+
steps:
189+
- uses: actions/checkout@v2
190+
191+
- name: Init Git and pull
192+
run: |
193+
git config --global user.email "actions@github.com"
194+
git config --global user.name "GitHub Actions"
195+
git pull
196+
197+
- 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
205+
with:
206+
path: ~/.m2/repository
207+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
208+
restore-keys: |
209+
${{ runner.os }}-maven-:
210+
211+
- name: Build dependencies/licenses files
212+
run: mvn -B project-info-reports:dependencies
213+
working-directory: vaadin-chip-combobox
214+
215+
- name: Upload licenses - Upload Artifact
216+
uses: actions/upload-artifact@v2
217+
with:
218+
name: dependencies-licenses
219+
path: vaadin-chip-combobox/target/site
220+
221+
- name: Generate docs/dependencies dir
222+
run: mkdir -p docs/dependencies
223+
224+
- name: Move built files into docs/dependencies
225+
run: mv vaadin-chip-combobox/target/site/* docs/dependencies
226+
227+
- name: Rename dependencies.html to index.html
228+
working-directory: docs/dependencies
229+
run: mv dependencies.html index.html
230+
231+
- name: Copy Readme into docs (as index.md)
232+
run: cp README.md docs/index.md
233+
234+
- name: Configure Pages
235+
working-directory: docs
236+
run: |-
237+
echo "theme: jekyll-theme-tactile" > _config.yml
238+
239+
- name: Deploy to Github pages
240+
uses: peaceiris/actions-gh-pages@v3
241+
with:
242+
github_token: ${{ secrets.GITHUB_TOKEN }}
243+
publish_dir: ./docs
244+
enable_jekyll: true
245+
246+
after_release:
247+
runs-on: ubuntu-latest
248+
needs: [publish_central, build_directory]
249+
steps:
250+
- uses: actions/checkout@v2
251+
252+
- name: Init Git and pull
253+
run: |
254+
git config --global user.email "actions@github.com"
255+
git config --global user.name "GitHub Actions"
256+
git pull
257+
258+
- name: Inc Version and SNAP root
259+
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
260+
261+
- name: Inc Version and SNAP demo
262+
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
263+
working-directory: vaadin-chip-combobox-demo
264+
265+
- name: Inc Version and SNAP
266+
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
267+
working-directory: vaadin-chip-combobox
268+
269+
- name: Git Commit and Push
270+
run: |
271+
git add -A
272+
git commit -m "Preparing for next development iteration"
273+
git push origin
274+
275+
- name: pull-request
276+
uses: repo-sync/pull-request@v2
277+
with:
278+
github_token: ${{ secrets.GITHUB_TOKEN }}
279+
destination_branch: "develop"
280+
pr_title: "Sync back"
281+
pr_body: "An automated PR to sync changes back"
282+

vaadin-chip-combobox-demo/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<failOnMissingWebXml>false</failOnMissingWebXml>
4141

4242
<!-- Dependency-Versions -->
43-
<vaadin.version>14.6.2</vaadin.version>
43+
<vaadin.version>14.6.3</vaadin.version>
4444
</properties>
4545

4646
<dependencyManagement>
@@ -79,7 +79,7 @@
7979
<plugin>
8080
<groupId>org.eclipse.jetty</groupId>
8181
<artifactId>jetty-maven-plugin</artifactId>
82-
<version>9.4.41.v20210516</version>
82+
<version>9.4.42.v20210604</version>
8383
<configuration>
8484
<scanIntervalSeconds>1</scanIntervalSeconds>
8585
</configuration>

0 commit comments

Comments
 (0)