Skip to content

Commit

Permalink
Release 0.7.0 ready (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaadin-miki authored Jun 22, 2020
1 parent 511d16e commit be67db6
Show file tree
Hide file tree
Showing 54 changed files with 1,580 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/makerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Create Release
uses: fleskesvor/create-release@feature/support-target-commitish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACTIONS_PAT }}
with:
tag_name: "v${{ steps.variables.outputs.version }}"
commitish: "master"
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/releasebranch.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: Release branch on milestone close
name: Merge release notes, create release branch

on:
milestone:
types: [closed]
pull_request:
types: [opened]

jobs:
make-branch:
make-release-branch:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.milestone.title, '0.') || startsWith(github.event.milestone.title, '1.') || startsWith(github.event.milestone.title, '2.') || startsWith(github.event.milestone.title, '3.') || startsWith(github.event.milestone.title, '4.') || startsWith(github.event.milestone.title, '5.') || startsWith(github.event.milestone.title, '6.') || startsWith(github.event.milestone.title, '7.') || startsWith(github.event.milestone.title, '8.') || startsWith(github.event.milestone.title, '9.') }}
if: ${{ startsWith(github.event.pull_request.title, 'Release notes for version') && startsWith(github.event.pull_request.head.ref, 'notes-') }}
timeout-minutes: 30
steps:
- id: version
run: |
set -x
echo "::set-output name=version::`echo '${{ github.event.milestone.title }}' | cut -d' ' -f1`"
- name: Push release branch
echo "::set-output name=version::`echo '${{ github.event.pull_request.head.ref }}' | cut -d'-' -f2`"
- name: Merge PR
uses: UnforgivenPL/merge-pr@v2
with:
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
pr: ${{ github.event.number }}
delay: 300
must-have-labels: release
- name: Create release branch
uses: UnforgivenPL/push-branch@v2
with:
repository: ${{ github.repository }}
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/releasenotes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Prepare release notes when milestone closes

on:
milestone:
types: [closed]

jobs:
update-release-notes:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.milestone.title, '0.') || startsWith(github.event.milestone.title, '1.') || startsWith(github.event.milestone.title, '2.') || startsWith(github.event.milestone.title, '3.') || startsWith(github.event.milestone.title, '4.') || startsWith(github.event.milestone.title, '5.') || startsWith(github.event.milestone.title, '6.') || startsWith(github.event.milestone.title, '7.') || startsWith(github.event.milestone.title, '8.') || startsWith(github.event.milestone.title, '9.') }}
steps:
- id: version
run: |
set -x
echo "::set-output name=version::`echo '${{ github.event.milestone.title }}' | cut -d' ' -f1`"
- name: Push milestone notes branch
uses: UnforgivenPL/push-branch@v2
with:
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
source: development
target: notes-${{ steps.version.outputs.version }}
- uses: actions/checkout@v2
with:
ref: notes-${{ steps.version.outputs.version }}
- name: Create milestone notes
uses: UnforgivenPL/milestone-notes@v1
with:
match-milestone: "^${{ steps.version.outputs.version }} "
repository: ${{ github.repository }}
labels: "enhancement, api, bug"
- name: Format milestone notes
run: |
sed -i -e "s/## enhancement/## New features and enhancements/g" milestone-notes.md
sed -i -e "s/## api/## Changes to API/g" milestone-notes.md
sed -i -e "s/## bug/## Bug fixes/g" milestone-notes.md
sed -i -e "s/^$/(nothing reported)/g" milestone-notes.md
- name: Update release notes
run: |
echo -e "\n" | cat milestone-notes.md - superfields/release-notes.md > superfields/release-notes.md.new
awk 'NF' superfields/release-notes.md.new
mv superfields/release-notes.md.new superfields/release-notes.md
- name: Remove milestone notes
run: rm milestone-notes.md
- name: Push changes to notes branch
uses: stefanzweifel/git-auto-commit-action@v4.1.6
with:
commit_message: "(bot) release notes updated for ${{ steps.version.outputs.version }}"
branch: notes-${{ steps.version.outputs.version }}
- name: Create PR
uses: UnforgivenPL/pull-request@v1
with:
source: notes-${{ steps.version.outputs.version }}
target: development
repository: ${{ github.repository }}
token: ${{ secrets.ACTIONS_PAT }}
pr-title: Release notes for version ${{ steps.what-version.outputs.version }}
pr-body: Automatically updated notes ${{ steps.what-version.outputs.version }}.
pr-assignees: ${{ github.actor }}
pr-labels: release
32 changes: 13 additions & 19 deletions .github/workflows/setversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 10
uses: actions/setup-java@v1
with:
Expand All @@ -28,29 +30,21 @@ jobs:
mvn versions:set -DnewVersion=$VERSION --file pom.xml
mvn versions:set -DnewVersion=$VERSION --file superfields/pom.xml
sed -i -e s/{VERSION}/$VERSION/g ./README.md
- name: Create milestone notes
uses: UnforgivenPL/milestone-notes@v1
with:
match-milestone: "^${{ steps.what-version.outputs.version }} "
repository: ${{ github.repository }}
labels: "enhancement, api, bug"
- name: Format milestone notes
run: |
sed -i -e "s/## enhancement/## New features and enhancements/g" milestone-notes.md
sed -i -e "s/## api/## Changes to API/g" milestone-notes.md
sed -i -e "s/## bug/## Bug fixes/g" milestone-notes.md
sed -i -e "s/^$/(nothing reported)/g" milestone-notes.md
- name: Update release notes
run: |
echo -e "\n" | cat milestone-notes.md - superfields/release-notes.md > superfields/release-notes.md.new
mv superfields/release-notes.md.new superfields/release-notes.md
- name: Remove milestone notes
run: rm milestone-notes.md
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4.1.6
with:
commit_message: "(bot) version and release notes updated to ${{ steps.what-version.outputs.version }}"
commit_message: "(bot) version updated to ${{ steps.what-version.outputs.version }}"
branch: ${{ github.event.ref }}
- name: Resolve conflicts (keep ours)
run: |
set -x
git fetch
git checkout master
git checkout ${{ github.event.ref }}
git config user.email "${{ secrets.EMAIL }}"
git config user.name "Miki (bot)"
git merge master --strategy=ours
git push origin
- name: Create PR
uses: UnforgivenPL/pull-request@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is the relevant dependency:
<dependency>
<groupId>org.vaadin.miki</groupId>
<artifactId>superfields</artifactId>
<version>0.6.2</version>
<version>0.7.0</version>
</dependency>
```

Expand Down
26 changes: 24 additions & 2 deletions demo-v14/frontend/styles/demo-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ p.selected-tab {
background: #2b908f;
font-weight: bold;
border: 3px solid darkblue;
padding: 0px;
padding: 0;
}

div.item-grid-cell {
Expand All @@ -42,4 +42,26 @@ span.highlighted {
font-style: italic;
letter-spacing: 1px;
color: #004444;
}
}

.section-layout {
padding-top: 1em;
padding-bottom: 1em;
margin-top: 1em;
}

.section-header {
font-size: larger;
text-align: center;
font-weight: bold;
letter-spacing: 1px;
}

.component-header {
text-align: left;
}

.component-section {
padding: 1em;
margin: 1em;
}
3 changes: 3 additions & 0 deletions demo-v14/frontend/styles/super-tabs-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:host(#belongs-to-super-tabs) [part="tabs"] {
width: 400px;
}
6 changes: 3 additions & 3 deletions demo-v14/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions demo-v14/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<artifactId>superfields-parent</artifactId>
<groupId>org.vaadin.miki</groupId>
<version>0.6.2</version>
<version>0.7.0</version>
</parent>

<artifactId>superfields-demo-v14</artifactId>
<version>0.6.2</version>
<version>0.7.0</version>
<name>V14 demo app for SuperFields</name>
<description>Showcase application for V14 and SuperFields.</description>
<packaging>war</packaging>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>org.vaadin.miki</groupId>
<artifactId>superfields</artifactId>
<version>0.6.2</version>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
27 changes: 27 additions & 0 deletions demo-v14/src/main/java/org/vaadin/miki/InfoPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.vaadin.miki;

import com.vaadin.flow.component.html.Anchor;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;

/**
* Information about the demo, its organisation and components.
* @author miki
* @since 2020-06-03
*/
public class InfoPage extends VerticalLayout {

public InfoPage() {
super(
new Span("Hello and welcome to SuperFields demo! Thank you for your interest in this little project, I hope you find it useful."),
new Span("The components shown in this demo are available in SuperFields, a small collection of handy stuff designed to work with Vaadin 14 and Java."),
new Span("To see a component in action simply select a corresponding tab from above. Each page features the chosen component at the top, followed by (some of) the configurable options."),
new Span("Bottom left corner of the browser window will show major notifications from each component - like value change notifications. Bottom right corner is reserved for secondary notifications, e.g. focus and blur events."),
new Anchor("https://github.com/vaadin-miki/super-fields", "More information can be found on the project's main page on GitHub."),
new Anchor("https://github.com/vaadin-miki/super-fields/issues", "Please use GitHub to report issues and request features and components."),
new Anchor("https://vaadin.com/directory/component/superfields", "If you find this library useful, please consider sparing a moment and writing a comment or leaving a rating in the Vaadin Directory. Thank you!"),
new Span("Disclaimer: unless otherwise noted, all code has been written by me (Miki) and is released under Apache 2.0 License. This library is not officially supported or endorsed by Vaadin and is not part of the Vaadin Platform.")
);
}

}
Loading

0 comments on commit be67db6

Please sign in to comment.