Skip to content

Commit 2329aab

Browse files
authored
Merge pull request #20 from xdev-software/develop
1.0.4 (No2)
2 parents c714b80 + cb2b67e commit 2329aab

File tree

7 files changed

+182
-191
lines changed

7 files changed

+182
-191
lines changed

.github/workflows/gh-pages.yml

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

.github/workflows/master.yml

Lines changed: 178 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,189 @@ jobs:
4040
git push origin
4141
git tag v${{ steps.version.outputs.release }}
4242
git push origin --tags
43+
44+
- name: Create Release
45+
id: create_release
46+
uses: actions/create-release@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
with:
50+
tag_name: v${{ steps.version.outputs.release }}
51+
release_name: v${{ steps.version.outputs.release }}
52+
body: |
53+
## Installation
54+
Add the following lines to your pom:
55+
```XML
56+
<dependency>
57+
<groupId>com.xdev-software</groupId>
58+
<artifactId>vaadin-maps-leaflet-flow</artifactId>
59+
<version>${{ steps.version.outputs.release }}</version>
60+
</dependency>
61+
```
62+
draft: false
63+
prerelease: false
4364

44-
after_release:
65+
- name: Save Release Asset Upload URL to File
66+
shell: bash
67+
run: |
68+
echo '${{ steps.create_release.outputs.upload_url }}' > release_asset_upload_url.txt
69+
70+
- name: Upload Release Asset Upload URL
71+
uses: actions/upload-artifact@v2
72+
with:
73+
name: release_asset_upload_url
74+
path: release_asset_upload_url.txt
75+
76+
publish_central: # Publish the code to central
77+
runs-on: ubuntu-latest
78+
needs: [prepare_release]
79+
steps:
80+
- uses: actions/checkout@v2
81+
82+
- name: Init Git and pull
83+
run: |
84+
git config --global user.email "[email protected]"
85+
git config --global user.name "GitHub Actions"
86+
git pull
87+
88+
- name: Set up JDK 1.8 Apache Maven Central
89+
uses: actions/setup-java@v1
90+
with: # running setup-java again overwrites the settings.xml
91+
java-version: 1.8
92+
server-id: ossrh
93+
server-username: MAVEN_CENTRAL_USERNAME
94+
server-password: MAVEN_CENTRAL_TOKEN
95+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
96+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
97+
98+
- name: Publish to Apache Maven Central
99+
run: mvn deploy -Possrh
100+
env:
101+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
102+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
103+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
104+
working-directory: vaadin-maps-leaflet-flow
105+
106+
build_directory: # Build a ZIP that can be uploaded to Vaadin Directory
45107
runs-on: ubuntu-latest
46108
needs: [prepare_release]
47109
steps:
48110
- uses: actions/checkout@v2
111+
112+
- name: Init Git and pull
113+
run: |
114+
git config --global user.email "[email protected]"
115+
git config --global user.name "GitHub Actions"
116+
git pull
117+
118+
- name: Set up JDK 1.8
119+
uses: actions/setup-java@v1
120+
with:
121+
java-version: 1.8
122+
123+
- name: Build for Vaadin Directory
124+
run: mvn -B install -Pdirectory
125+
working-directory: vaadin-maps-leaflet-flow
126+
127+
- name: Upload asset
128+
uses: actions/upload-artifact@v2
129+
with:
130+
name: vaadin-directory-files
131+
path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-*.zip
132+
if-no-files-found: error
133+
134+
- name: Download Release Asset Upload URL
135+
uses: actions/download-artifact@v2
136+
with:
137+
name: release_asset_upload_url
138+
path: temp_artf/release_asset_upload_url
139+
140+
- name: Fake steps.create_release.outputs.upload_url from predecessor
141+
id: create_release
142+
run: echo "::set-output name=upload_url::$(cat temp_artf/release_asset_upload_url/release_asset_upload_url.txt)"
143+
144+
- name: Get version
145+
id: version
146+
run: |
147+
echo "::set-output name=release::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
148+
working-directory: vaadin-maps-leaflet-flow
149+
150+
- name: Upload Release Asset
151+
uses: actions/upload-release-asset@v1
152+
env:
153+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154+
with:
155+
upload_url: ${{ steps.create_release.outputs.upload_url }}
156+
asset_path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
157+
asset_name: vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
158+
asset_content_type: application/zip
159+
160+
publish-pages: # Update online reference for dependencies and licenses
161+
name: Publish dependencies and licenses to github pages
162+
runs-on: ubuntu-latest
163+
164+
steps:
165+
- uses: actions/checkout@v2
166+
167+
- name: Init Git and pull
168+
run: |
169+
git config --global user.email "[email protected]"
170+
git config --global user.name "GitHub Actions"
171+
git pull
172+
173+
- name: Setup - Java
174+
uses: actions/setup-java@v1
175+
with:
176+
java-version: 1.8
177+
178+
- name: Restore - Maven Cache
179+
uses: actions/cache@v1
180+
with:
181+
path: ~/.m2/repository
182+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
183+
restore-keys: |
184+
${{ runner.os }}-maven-:
185+
186+
- name: Build dependencies/licenses files
187+
run: mvn -B project-info-reports:dependencies
188+
working-directory: vaadin-maps-leaflet-flow
189+
190+
- name: Upload licenses - Upload Artifact
191+
uses: actions/upload-artifact@v2
192+
with:
193+
name: dependencies-licenses
194+
path: vaadin-maps-leaflet-flow/target/site
195+
196+
- name: Generate docs/dependencies dir
197+
run: mkdir -p docs/dependencies
198+
199+
- name: Move built files into docs/dependencies
200+
run: mv vaadin-maps-leaflet-flow/target/site/* docs/dependencies
201+
202+
- name: Rename dependencies.html to index.html
203+
working-directory: docs/dependencies
204+
run: mv dependencies.html index.html
205+
206+
- name: Copy Readme into docs (as index.md)
207+
run: cp README.md docs/index.md
208+
209+
- name: Configure Pages
210+
working-directory: docs
211+
run: |-
212+
echo "theme: jekyll-theme-tactile" > _config.yml
213+
214+
- name: Deploy to Github pages
215+
uses: peaceiris/actions-gh-pages@v3
216+
with:
217+
github_token: ${{ secrets.GITHUB_TOKEN }}
218+
publish_dir: ./docs
219+
enable_jekyll: true
220+
221+
after_release:
222+
runs-on: ubuntu-latest
223+
needs: [publish_central, build_directory]
224+
steps:
225+
- uses: actions/checkout@v2
49226

50227
- name: Init Git and pull
51228
run: |

.github/workflows/release.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build](https://img.shields.io/github/workflow/status/xdev-software/vaadin-maps-leaflet-flow/Release%20CI)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions?query=workflow%3A%22Release+CI%22)
1+
[![Build](https://img.shields.io/github/workflow/status/xdev-software/vaadin-maps-leaflet-flow/Master%20CI)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions?query=workflow%3A%22Master+CI%22)
22
[![Latest version](https://img.shields.io/maven-central/v/com.xdev-software/vaadin-maps-leaflet-flow)](https://mvnrepository.com/artifact/com.xdev-software/vaadin-maps-leaflet-flow)
33
[![Build Develop](https://img.shields.io/github/workflow/status/xdev-software/vaadin-maps-leaflet-flow/Develop%20CI/develop?label=build%20develop)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions?query=workflow%3A%22Develop+CI%22+branch%3Adevelop)
44

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.xdev-software</groupId>
88
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
9-
<version>1.0.5-SNAPSHOT</version>
9+
<version>1.0.4-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<name>vaadin-maps-leaflet-flow-root</name>

0 commit comments

Comments
 (0)