diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml
new file mode 100644
index 0000000000..f2a99a8ca2
--- /dev/null
+++ b/.github/workflows/update-readme.yml
@@ -0,0 +1,94 @@
+name: Update readme on master
+
+on:
+ push:
+ branches:
+ - 'master'
+
+jobs:
+ update-readme:
+ runs-on: ubuntu-18.04
+ name: "Update readme on master to latest release"
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-java@v1
+ with:
+ java-version: 8
+ - name: Cache Maven packages
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository
+ !~/.m2/repository/fr/sii/
+ key: ${{ runner.os }}-m2-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}
+ - name: "Get latest release"
+ id: latest-release
+ run: |
+ LATEST_RELEASE=$(git tag -l | sort -Vr | head -n1)
+ echo "::set-output name=version::$LATEST_RELEASE"
+ - name: "Generate README.adoc"
+ run:
+ ./mvnw install
+ -DskipTests=true
+ -Dmaven.javadoc.skip=true
+ -Dreadme.skip=false
+ -DdocOghamVersion=${{ steps.latest-release.version}}
+ -Dgit.branch=master
+ - name: "Has changed"
+ id: has-changed
+ run: |
+ CHANGED=$(git status --porcelain | grep README.adoc && echo 'true' || echo 'false')
+ echo "::set-output name=changed::$CHANGED"
+ - name: "Update README"
+ run: |
+ if [ "${{ steps.has-changed.changed }}" != "true" ]; then
+ echo "README already up-to-date"
+ exit 0
+ fi
+ echo "::warning ::Need to update README"
+ git config user.email github-actions@github.com
+ git config user.name github-actions
+ git add .
+ git commit -m "doc(readme) Update README to always show latest release version (${{ steps.latest-release.version}}) on master"
+ git push
+
+ slack-updated:
+ if: success() && fromJson(needs.update-readme.outputs.changed)
+ needs: [update-readme]
+ runs-on: ubuntu-18.04
+ name: "Slack"
+ steps:
+ - uses: 8398a7/action-slack@v3
+ with:
+ status: success
+ fields: workflow,ref
+ username: 'readme'
+ author_name: ''
+ icon_url: https://github.com/groupe-sii/ogham/raw/master/src/site/resources/img/ogham-blue-256x256.png
+ text: |
+ :x: readme updated on master
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+
+ slack-failure:
+ if: failure()
+ needs: [update-readme]
+ runs-on: ubuntu-18.04
+ name: "Slack"
+ steps:
+ - uses: 8398a7/action-slack@v3
+ with:
+ status: failure
+ fields: workflow,ref
+ username: 'readme'
+ author_name: ''
+ icon_url: https://github.com/groupe-sii/ogham/raw/master/src/site/resources/img/ogham-blue-256x256.png
+ text: |
+ :x: failed to update readme on master
+ env:
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+
+
\ No newline at end of file
diff --git a/README.adoc b/README.adoc
index b329e5ac50..b6f3748983 100644
--- a/README.adoc
+++ b/README.adoc
@@ -18,7 +18,7 @@ endif::[]
image:https://img.shields.io/maven-central/v/fr.sii.ogham/ogham-all.svg["Latest Release Standalone", link="https://mvnrepository.com/artifact/fr.sii.ogham/ogham-all/"]
image:https://img.shields.io/badge/License-Apache%202.0-lightgrey.svg["License", link="https://opensource.org/licenses/Apache-2.0"]
-image:https://github.com/groupe-sii/ogham/workflows/Build/badge.svg?branch=develop["Build Status", link="https://github.com/groupe-sii/ogham/actions?query=workflow%3ABuild"]
+image:https://github.com/groupe-sii/ogham/workflows/Build/badge.svg?branch=master["Build Status", link="https://github.com/groupe-sii/ogham/actions?query=workflow%3ABuild"]
image:https://sonarcloud.io/api/project_badges/measure?project=fr.sii.ogham%3Aogham-parent&metric=alert_status["Sonar", link="https://sonarcloud.io/dashboard?id=fr.sii.ogham%3Aogham-parent"]
image:https://sonarcloud.io/api/project_badges/measure?project=fr.sii.ogham%3Aogham-parent&metric=sqale_rating["Sonar", link="https://sonarcloud.io/dashboard?id=fr.sii.ogham%3Aogham-parent"]
@@ -32,7 +32,7 @@ image:https://sonarcloud.io/api/project_badges/measure?project=fr.sii.ogham%3Aog
--
-image::https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/presentation/showcase.png[Showcase, link=https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/showcase-video.html]
+image::https://groupe-sii.github.io/ogham/v3.0.0/presentation/showcase.png[Showcase, link=https://groupe-sii.github.io/ogham/v3.0.0/showcase-video.html]
'''
@@ -46,19 +46,19 @@ image::https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/presentation/showcase.
[cols=3, %autowidth.stretch]
|===
| image:https://img.shields.io/endpoint?url=https://groupe-sii.github.io/ogham/badges/latest-release-version.json[Latest Release, link="https://groupe-sii.github.io/ogham/redirects/latest-release-site.html"]
-| image:https://img.shields.io/static/v1?label=This%20version&message=v3.1.0-SNAPSHOT[This version, link="https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT"]
+| image:https://img.shields.io/static/v1?label=This%20version&message=v3.0.0[This version, link="https://groupe-sii.github.io/ogham/v3.0.0"]
| image:https://img.shields.io/endpoint?url=https://groupe-sii.github.io/ogham/badges/nightly-build-version.json[Nightly build, link="https://groupe-sii.github.io/ogham/redirects/nightly-build-site.html"]
| https://groupe-sii.github.io/ogham/redirects/latest-release-site.html[site]
-| https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT[site]
+| https://groupe-sii.github.io/ogham/v3.0.0[site]
| https://groupe-sii.github.io/ogham/redirects/nightly-build-site.html[site]
| https://groupe-sii.github.io/ogham/redirects/latest-release-code.html[code]
-| https://github.com/groupe-sii/ogham/tree/develop[code]
+| https://github.com/groupe-sii/ogham/tree/master[code]
| https://github.com/groupe-sii/ogham/tree/master[code]
| https://groupe-sii.github.io/ogham/redirects/latest-release-showcase.html[showcase]
-| https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/presentation/showcase.html[showcase]
+| https://groupe-sii.github.io/ogham/v3.0.0/presentation/showcase.html[showcase]
| https://groupe-sii.github.io/ogham/redirects/nightly-build-showcase.html[showcase]
|===
@@ -117,12 +117,12 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
fr.sii.ogham
ogham-all
- 3.1.0-SNAPSHOT
+ 3.0.0
...
----
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/pom.xml?ts=2[View code of an example pom.xml]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/pom.xml?ts=2[View code of an example pom.xml]
'''
@@ -135,7 +135,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
----
...
dependencies {
- implementation 'fr.sii.ogham:ogham-all:3.1.0-SNAPSHOT'
+ implementation 'fr.sii.ogham:ogham-all:3.0.0'
}
----
@@ -185,7 +185,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
fr.sii.ogham
ogham-spring-boot-starter-all
- 3.1.0-SNAPSHOT
+ 3.0.0
...
@@ -203,7 +203,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
...
dependencies {
- implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.1.0-SNAPSHOT'
+ implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.0.0'
...
}
----
@@ -243,7 +243,7 @@ image:src/docs/resources/images/icons/maven-logo.png[Maven,width=118,height=30]
fr.sii.ogham
ogham-spring-boot-starter-all
- 3.1.0-SNAPSHOT
+ 3.0.0
@@ -280,7 +280,7 @@ image:src/docs/resources/images/icons/gradlephant-logo.png[Gradle,width=114,heig
...
dependencies {
- implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.1.0-SNAPSHOT' // <1>
+ implementation 'fr.sii.ogham:ogham-spring-boot-starter-all:3.0.0' // <1>
implementation 'org.springframework.boot:spring-boot-starter-freemarker' // <2>
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // <3>
@@ -356,7 +356,7 @@ is easy but may import dependencies that you
don't need. For example, you may only need FreeMarker but not Thymeleaf. Or
you may only need to send emails through SMTP but never use SendGrid.
-See how to https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/user-manual.html#select-features-standalone[select features].
+See how to https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#select-features-standalone[select features].
== Usage
@@ -364,17 +364,17 @@ See how to https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/user-manual.html#s
[NOTE]
====
All samples with templates are using ThymeLeaf as template engine. For FreeMarker samples,
-take a look at https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/user-manual.html#freemarker[FreeMarker section].
+take a look at https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#freemarker[FreeMarker section].
====
=== Send Email
[NOTE]
====
-The samples are available in the https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage[sample-standard-usage sub-project].
+The samples are available in the https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage[sample-standard-usage sub-project].
All samples shown bellow are using SMTP for sending email.
-See https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/user-manual.html#sendgrid[Sending email through SendGrid]
+See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#sendgrid[Sending email through SendGrid]
to know how to send email using SendGrid HTTP API.
====
@@ -444,7 +444,7 @@ public class BasicSample {
<3> Create a MessagingService instance
<4> Send an email with a subject and a simple body. The sender address is automatically set using `ogham.email.from.default-value` property
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/BasicSample.java?ts=2[Source code of the sample].
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/BasicSample.java?ts=2[Source code of the sample].
_____
@@ -453,7 +453,7 @@ _____
The construction of the email is done using a fluent API in order to chain calls and to have a more readable code.
-Properties are directly provided in the code. You can instead https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/user-manual.html#properties-handling[use a configuration file].
+Properties are directly provided in the code. You can instead https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#properties-handling[use a configuration file].
.Email address format
@@ -530,7 +530,7 @@ public class HtmlTemplateSample {
<5> Indicate the path to the HTML template file (in the classpath)
<6> Use any bean object for replacing variables in template
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlTemplateSample.java?ts=2[Source code of the sample].
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlTemplateSample.java?ts=2[Source code of the sample].
'''
@@ -554,7 +554,7 @@ image:src/docs/resources/images/icons/thymeleaf.jpg[width=30,height=30] ThymeLea
<2> Use the `name` attribute value in the template
<3> Use the `value` attribute value in the template
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/resources/template/thymeleaf/simple.html?ts=2[Source code of the HTML template]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/resources/template/thymeleaf/simple.html?ts=2[Source code of the HTML template]
_____
@@ -571,7 +571,7 @@ The `template` method requires two pieces of information:
The path to the template is a string that may contain a *lookup* prefix. The lookup prefix is used to indicate
where to search the template (from file system, from classpath or anywhere else). Here we explicitly
ask to load the template from classpath (using prefix `classpath:`). If no lookup is defined,
-classpath is used by default. See https://groupe-sii.github.io/ogham/v3.1.0-SNAPSHOT/user-manual.html#resource-resolution[Resource resolution section] for more information.
+classpath is used by default. See https://groupe-sii.github.io/ogham/v3.0.0/user-manual.html#resource-resolution[Resource resolution section] for more information.
The variables are any object you are using in your application. No need to convert your object to a
particular format. Directly use what you want.
@@ -641,7 +641,7 @@ image:src/docs/resources/images/icons/java-logo.png[width=16,height=30] Java
----
<1> Subject is no more in Java code
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlTemplateWithSubjectSample.java?ts=2[Source code of the sample]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlTemplateWithSubjectSample.java?ts=2[Source code of the sample]
'''
@@ -667,7 +667,7 @@ image:src/docs/resources/images/icons/thymeleaf.jpg[width=30,height=30] ThymeLea
NOTE: The subject of the email will be `Subject of the email - Welcome foo !`
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/resources/template/thymeleaf/simpleWithSubject.html?ts=2[Source code of the HTML template]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/resources/template/thymeleaf/simpleWithSubject.html?ts=2[Source code of the HTML template]
_____
@@ -721,7 +721,7 @@ public class TextTemplateWithSubjectSample {
----
<1> Subject is no more in Java code
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/TextTemplateWithSubjectSample.java?ts=2[Source code of the sample]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/TextTemplateWithSubjectSample.java?ts=2[Source code of the sample]
'''
@@ -738,7 +738,7 @@ Foo bar ${value}
NOTE: The subject of the email will be `Welcome foo !`
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/resources/template/freemarker/simpleWithSubject.txt.ftl?ts=2[Source code of the text template]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/resources/template/freemarker/simpleWithSubject.txt.ftl?ts=2[Source code of the text template]
_____
@@ -831,7 +831,7 @@ image:src/docs/resources/images/icons/java-logo.png[width=16,height=30] Java
`/template/withImagesAndCss/resources.txt.ftl` for the text alternative)
<2> The template context
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlWithImagesAndCssTemplateSample.java?ts=2[Source code of the sample]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlWithImagesAndCssTemplateSample.java?ts=2[Source code of the sample]
'''
@@ -906,7 +906,7 @@ determined
<6> Same as <3>
<7> The image is not inlined by Ogham. This can be useful to embed it manually.
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/resources/template/withImagesAndCss/resources.html?ts=2[Source code of the HTML template]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/resources/template/withImagesAndCss/resources.html?ts=2[Source code of the HTML template]
'''
@@ -1107,7 +1107,7 @@ The call order between `text()` and `html()` doesn't matter (unlike using `.cont
The underlying `Content` is a `MultiContent`.
=====
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlAndTextSample.java?ts=2[Source code of the sample]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlAndTextSample.java?ts=2[Source code of the sample]
_____
@@ -1172,7 +1172,7 @@ extension).
The underlying `Content` is a `MultiTemplateContent`.
=====
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlAndTextTemplateSample.java?ts=2[Source code of the sample]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/java/fr/sii/ogham/sample/standard/email/HtmlAndTextTemplateSample.java?ts=2[Source code of the sample]
'''
@@ -1185,7 +1185,7 @@ image:src/docs/resources/images/icons/thymeleaf-text.jpg[width=30,height=30] Tex
[[${name}]] [[${value}]]
----
-https://github.com/groupe-sii/ogham/tree/develop/sample-standard-usage/src/main/resources/template/thymeleaf/simple.txt?ts=2[Source code of the text template]
+https://github.com/groupe-sii/ogham/tree/master/sample-standard-usage/src/main/resources/template/thymeleaf/simple.txt?ts=2[Source code of the text template]
'''
@@ -1208,7 +1208,7 @@ image:src/docs/resources/images/icons/thymeleaf-html.jpg[width=30,height=30] HTM