Skip to content

Commit e0b56f2

Browse files
authored
Merge pull request #17 from xdev-software/develop
1.0.4
2 parents d4c2df8 + f8a6245 commit e0b56f2

File tree

28 files changed

+20984
-215
lines changed

28 files changed

+20984
-215
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "04:00"
8+
open-pull-requests-limit: 10
9+
- package-ecosystem: maven
10+
directory: "/"
11+
schedule:
12+
interval: daily
13+
time: "04:00"
14+
open-pull-requests-limit: 10

.github/workflows/develop-pr.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/develop.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Develop CI
33
on:
44
push:
55
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
68

79
jobs:
810
build:
@@ -22,7 +24,25 @@ jobs:
2224
path: ~/.m2/repository
2325
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2426
restore-keys: |
25-
${{ runner.os }}-maven-
26-
27+
${{ runner.os }}-maven-
28+
2729
- name: Build with Maven
2830
run: mvn -B clean package -Pproduction
31+
32+
- name: Check for uncommited changes
33+
run: |
34+
if [[ "$(git status --porcelain)" != "" ]]; then
35+
echo ----------------------------------------
36+
echo git status
37+
echo ----------------------------------------
38+
git status
39+
echo ----------------------------------------
40+
echo git diff
41+
echo ----------------------------------------
42+
git diff
43+
echo ----------------------------------------
44+
echo Troubleshooting
45+
echo ----------------------------------------
46+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package -Pproduction"
47+
exit 1
48+
fi

.github/workflows/gh-pages.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: GH-Pages CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
jobs:
10+
publish-pages:
11+
name: Publish dependencies and licenses to github pages
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup - Java
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
22+
- name: Restore - Maven Cache
23+
uses: actions/cache@v1
24+
with:
25+
path: ~/.m2/repository
26+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
27+
restore-keys: |
28+
${{ runner.os }}-maven-:
29+
30+
- name: Build dependencies/licenses files
31+
run: mvn -B project-info-reports:dependencies
32+
working-directory: vaadin-maps-leaflet-flow
33+
34+
- name: Upload licenses - Upload Artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: dependencies-licenses
38+
path: vaadin-maps-leaflet-flow/target/site
39+
40+
- name: Generate docs/dependencies dir
41+
run: mkdir -p docs/dependencies
42+
43+
- name: Move built files into docs/dependencies
44+
run: mv vaadin-maps-leaflet-flow/target/site/* docs/dependencies
45+
46+
- name: Rename dependencies.html to index.html
47+
working-directory: docs/dependencies
48+
run: mv dependencies.html index.html
49+
50+
- name: Copy Readme into docs (as index.md)
51+
run: cp README.md docs/index.md
52+
53+
- name: Configure Pages
54+
working-directory: docs
55+
run: |-
56+
echo "theme: jekyll-theme-tactile" > _config.yml
57+
58+
- name: Deploy to Github pages
59+
uses: peaceiris/actions-gh-pages@v3
60+
with:
61+
github_token: ${{ secrets.GITHUB_TOKEN }}
62+
publish_dir: ./docs
63+
enable_jekyll: true

.github/workflows/master.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Master CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
prepare_release:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Configure Git
15+
run: |
16+
git config --global user.email "[email protected]"
17+
git config --global user.name "GitHub Actions"
18+
19+
- name: Un-SNAP root
20+
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
21+
22+
- name: Un-SNAP demo
23+
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
24+
working-directory: vaadin-maps-leaflet-flow-demo
25+
26+
- name: Un-SNAP
27+
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
28+
working-directory: vaadin-maps-leaflet-flow
29+
30+
- name: Get version
31+
id: version
32+
run: |
33+
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
34+
working-directory: vaadin-maps-leaflet-flow
35+
36+
- name: Commit and Push
37+
run: |
38+
git add -A
39+
git commit -m "Release ${{ steps.version.outputs.release }}"
40+
git push origin
41+
git tag v${{ steps.version.outputs.release }}
42+
git push origin --tags
43+
44+
after_release:
45+
runs-on: ubuntu-latest
46+
needs: [prepare_release]
47+
steps:
48+
- uses: actions/checkout@v2
49+
50+
- name: Init Git and pull
51+
run: |
52+
git config --global user.email "[email protected]"
53+
git config --global user.name "GitHub Actions"
54+
git pull
55+
56+
- name: Inc Version and SNAP root
57+
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
58+
59+
- name: Inc Version and SNAP demo
60+
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
61+
working-directory: vaadin-maps-leaflet-flow-demo
62+
63+
- name: Inc Version and SNAP
64+
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
65+
working-directory: vaadin-maps-leaflet-flow
66+
67+
- name: Git Commit and Push
68+
run: |
69+
git add -A
70+
git commit -m "Preparing for next development iteration"
71+
git push origin
72+
73+
- name: pull-request
74+
uses: repo-sync/pull-request@v2
75+
with:
76+
github_token: ${{ secrets.GITHUB_TOKEN }}
77+
destination_branch: "develop"
78+
pr_title: "Sync back"
79+
pr_body: "An automated PR to sync changes back"
80+

.github/workflows/release.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Release CI
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
create_release:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Get original release version
17+
id: orig
18+
run: |
19+
echo "::set-output name=version::$(echo ${{github.event.client_payload.value}} | cut -dv -f2)"
20+
21+
- name: Create Release
22+
id: create_release
23+
uses: actions/create-release@v1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
tag_name: ${{ github.ref }}
28+
release_name: ${{ github.ref }}
29+
body: |
30+
## Installation
31+
Add the following lines to your pom:
32+
```XML
33+
<dependency>
34+
<groupId>com.xdev-software</groupId>
35+
<artifactId>vaadin-maps-leaflet-flow</artifactId>
36+
<version>${{ steps.orig.outputs.version }}}</version>
37+
</dependency>
38+
```
39+
draft: false
40+
prerelease: false
41+
42+
- name: Save Release Asset Upload URL to File
43+
shell: bash
44+
run: |
45+
echo '${{ steps.create_release.outputs.upload_url }}' > release_asset_upload_url.txt
46+
47+
- name: Upload Release Asset Upload URL
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: release_asset_upload_url
51+
path: release_asset_upload_url.txt
52+
53+
publish_central: # Publish the code to central
54+
runs-on: ubuntu-latest
55+
needs: [create_release]
56+
steps:
57+
- uses: actions/checkout@v2
58+
59+
- name: Set up JDK 1.8 Apache Maven Central
60+
uses: actions/setup-java@v1
61+
with: # running setup-java again overwrites the settings.xml
62+
java-version: 1.8
63+
server-id: ossrh
64+
server-username: MAVEN_CENTRAL_USERNAME
65+
server-password: MAVEN_CENTRAL_TOKEN
66+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
67+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
68+
69+
- name: Publish to Apache Maven Central
70+
run: mvn deploy -Possrh
71+
env:
72+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
73+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
74+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
75+
working-directory: vaadin-maps-leaflet-flow
76+
77+
build_directory: # Build a ZIP that can be uploaded to Vaadin Directory
78+
runs-on: ubuntu-latest
79+
needs: [create_release]
80+
steps:
81+
- uses: actions/checkout@v2
82+
83+
- name: Set up JDK 1.8
84+
uses: actions/setup-java@v1
85+
with:
86+
java-version: 1.8
87+
88+
- name: Build for Vaadin Directory
89+
run: mvn -B install -Pdirectory
90+
working-directory: vaadin-maps-leaflet-flow
91+
92+
- name: Upload asset
93+
uses: actions/upload-artifact@v2
94+
with:
95+
name: vaadin-directory-files
96+
path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-*.zip
97+
if-no-files-found: error
98+
99+
- name: Download Release Asset Upload URL
100+
uses: actions/download-artifact@v2
101+
with:
102+
name: release_asset_upload_url
103+
path: temp_artf/release_asset_upload_url
104+
105+
- name: Fake steps.create_release.outputs.upload_url from predecessor
106+
id: create_release
107+
run: echo "::set-output name=upload_url::$(cat temp_artf/release_asset_upload_url/release_asset_upload_url.txt)"
108+
109+
- name: Get version
110+
id: version
111+
run: |
112+
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
113+
working-directory: vaadin-maps-leaflet-flow
114+
115+
- name: Upload Release Asset
116+
uses: actions/upload-release-asset@v1
117+
env:
118+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
with:
120+
upload_url: ${{ steps.create_release.outputs.upload_url }}
121+
asset_path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
122+
asset_name: vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
123+
asset_content_type: application/zip

0 commit comments

Comments
 (0)