Skip to content

Commit 3aacbdd

Browse files
authored
Merge pull request #31 from xdev-software/develop
1.0.5 - Updated dependencies
2 parents 0ce1f61 + c175eaa commit 3aacbdd

File tree

9 files changed

+1094
-1684
lines changed

9 files changed

+1094
-1684
lines changed

.github/workflows/develop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,10 @@ jobs:
4646
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package -Pproduction"
4747
exit 1
4848
fi
49+
50+
- name: Upload demo files
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: demo-files
54+
path: vaadin-maps-leaflet-flow-demo/target/vaadin-maps-leaflet-flow-demo.war
55+
if-no-files-found: error

.github/workflows/master.yml

Lines changed: 47 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,50 @@ on:
55
branches: [ master ]
66

77
jobs:
8-
prepare_release:
8+
check_code: # Validates the code (see develop.yml)
99
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up JDK 1.8
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 1.8
1017

18+
- name: Cache local Maven repository
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.m2/repository
22+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
23+
restore-keys: |
24+
${{ runner.os }}-maven-
25+
26+
- name: Build with Maven
27+
run: mvn -B clean package -Pproduction
28+
29+
- name: Check for uncommited changes
30+
run: |
31+
if [[ "$(git status --porcelain)" != "" ]]; then
32+
echo ----------------------------------------
33+
echo git status
34+
echo ----------------------------------------
35+
git status
36+
echo ----------------------------------------
37+
echo git diff
38+
echo ----------------------------------------
39+
git diff
40+
echo ----------------------------------------
41+
echo Troubleshooting
42+
echo ----------------------------------------
43+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package -Pproduction"
44+
exit 1
45+
fi
46+
47+
prepare_release:
48+
runs-on: ubuntu-latest
49+
needs: [check_code]
50+
outputs:
51+
upload_url: ${{ steps.create_release.outputs.upload_url }}
1152
steps:
1253
- uses: actions/checkout@v2
1354

@@ -49,6 +90,7 @@ jobs:
4990
with:
5091
tag_name: v${{ steps.version.outputs.release }}
5192
release_name: v${{ steps.version.outputs.release }}
93+
commitish: master
5294
body: |
5395
## Installation
5496
Add the following lines to your pom:
@@ -62,17 +104,6 @@ jobs:
62104
draft: false
63105
prerelease: false
64106

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-
76107
publish_central: # Publish the code to central
77108
runs-on: ubuntu-latest
78109
needs: [prepare_release]
@@ -96,7 +127,7 @@ jobs:
96127
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
97128

98129
- name: Publish to Apache Maven Central
99-
run: mvn deploy -Possrh
130+
run: mvn -B deploy -Possrh
100131
env:
101132
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
102133
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
@@ -131,16 +162,6 @@ jobs:
131162
path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-*.zip
132163
if-no-files-found: error
133164

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-
144165
- name: Get version
145166
id: version
146167
run: |
@@ -152,15 +173,15 @@ jobs:
152173
env:
153174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154175
with:
155-
upload_url: ${{ steps.create_release.outputs.upload_url }}
176+
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
156177
asset_path: vaadin-maps-leaflet-flow/target/vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
157178
asset_name: vaadin-maps-leaflet-flow-${{ steps.version.outputs.release }}.zip
158179
asset_content_type: application/zip
159180

160-
publish-pages: # Update online reference for dependencies and licenses
181+
publish-pages:
161182
name: Publish dependencies and licenses to github pages
162183
runs-on: ubuntu-latest
163-
184+
needs: [prepare_release]
164185
steps:
165186
- uses: actions/checkout@v2
166187

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ If the ``develop`` is ready for release, create a pull request to the ``master``
2929

3030
When the release is finished do the following:
3131
* Merge the auto-generated PR (with the incremented version number) back into the ``develop``
32-
* Log into https://oss.sonatype.org/#stagingRepositories and close + release the staging deployment<br/>See also [this guide](https://central.sonatype.org/pages/releasing-the-deployment.html)
3332
* Add the release notes to the [GitHub release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest)
3433
* Upload the generated release asset zip into the [Vaadin Directory](https://vaadin.com/directory)
3534

0 commit comments

Comments
 (0)