Skip to content

Commit

Permalink
complete
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Mar 8, 2024
1 parent cf4dce3 commit b8c9884
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
name: Publish package to the Maven Central Repository
on:
push:
tags:
- mjml4j-*
workflow_dispatch:
inputs:
tag:
type: string
description: tag
jobs:
bump_version:
name: "Bump Version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
- name: Bump version
id: bump
run: "./mvnw versions:set -DnewVersion=${{ github.event.inputs.tag }} -DprocessAllModules && ./mvnw versions:commit -DprocessAllModules"
- name: Commit bumped version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Prepare release version ${{ github.event.inputs.tag }}"
publish:
runs-on: ubuntu-latest
steps:
Expand Down
29 changes: 29 additions & 0 deletions data/referral-email.mjml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<mjml>
<mj-head>
<mj-attributes>
<mj-all padding="0px"></mj-all>
<mj-text font-family="Ubuntu, Helvetica, Arial, sans-serif" padding="0 25px" font-size="13px"></mj-text>
<mj-section background-color="#ffffff"></mj-section>
<mj-class name="preheader" color="#000000" font-size="11px"></mj-class>
</mj-attributes>
</mj-head>
<mj-body background-color="#bedae6">
<mj-section>
<mj-column width="100%">
<mj-image src="http://go.mailjet.com/tplimg/mtrq/b/ox8s/mg1q9.png" alt="header image" padding="0px"></mj-image>
</mj-column>
</mj-section>
<mj-section padding-bottom="20px" padding-top="10px">
<mj-column>
<mj-text align="center" padding="10px 25px" font-size="20px" color="#512d0b"><strong>Hey {{FirstName}}!</strong></mj-text>
<mj-text align="center" font-size="18px" font-family="Arial">Are you enjoying our weekly newsletter?<br/> Then why not share it with your friends?</mj-text>
<mj-text align="center" color="#489BDA" font-size="25px" font-family="Arial, sans-serif" font-weight="bold" line-height="35px" padding-top="20px">You&apos;ll get a 15% discount <br/>
<span style="font-size:18px">on your next order when a friend uses the code {{ReferalCode}}!</span></mj-text>
<mj-button background-color="#8bb420" color="#FFFFFF" href="https://mjml.io" font-family="Arial, sans-serif" padding="20px 0 0 0" font-weight="bold" font-size="16px">Refer a friend now</mj-button>
<mj-text align="center" color="#000000" font-size="14px" font-family="Arial, sans-serif" padding-top="40px">Best, <br /> The {{CompanyName}} Team
<p></p>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
29 changes: 29 additions & 0 deletions data/sphero-droids.mjml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<mjml>
<mj-head>
<mj-attributes>
<mj-all padding="0px"></mj-all>
<mj-text font-family="Ubuntu, Helvetica, Arial, sans-serif" padding="0 25px" font-size="13px"></mj-text>
<mj-section background-color="#ffffff"></mj-section>
<mj-class name="preheader" color="#000000" font-size="11px"></mj-class>
</mj-attributes>
</mj-head>
<mj-body background-color="#bedae6">
<mj-section>
<mj-column width="100%">
<mj-image src="http://go.mailjet.com/tplimg/mtrq/b/ox8s/mg1q9.png" alt="header image" padding="0px"></mj-image>
</mj-column>
</mj-section>
<mj-section padding-bottom="20px" padding-top="10px">
<mj-column>
<mj-text align="center" padding="10px 25px" font-size="20px" color="#512d0b"><strong>Hey {{FirstName}}!</strong></mj-text>
<mj-text align="center" font-size="18px" font-family="Arial">Are you enjoying our weekly newsletter?<br/> Then why not share it with your friends?</mj-text>
<mj-text align="center" color="#489BDA" font-size="25px" font-family="Arial, sans-serif" font-weight="bold" line-height="35px" padding-top="20px">You&apos;ll get a 15% discount <br/>
<span style="font-size:18px">on your next order when a friend uses the code {{ReferalCode}}!</span></mj-text>
<mj-button background-color="#8bb420" color="#FFFFFF" href="https://mjml.io" font-family="Arial, sans-serif" padding="20px 0 0 0" font-weight="bold" font-size="16px">Refer a friend now</mj-button>
<mj-text align="center" color="#000000" font-size="14px" font-family="Arial, sans-serif" padding-top="40px">Best, <br /> The {{CompanyName}} Team
<p></p>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
10 changes: 10 additions & 0 deletions src/test/java/ch/digitalfondue/mjml4j/ComplexTemplateTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,14 @@ void testReceiptEmail() {
testTemplate("receipt-email");
}

@Test
void testReferralEmail() {
testTemplate("referral-email");
}

@Test
void testSpheroDroids() {
testTemplate("sphero-droids");
}

}

0 comments on commit b8c9884

Please sign in to comment.