diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8af1867..c254139 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/data/referral-email.mjml b/data/referral-email.mjml new file mode 100644 index 0000000..8673c3b --- /dev/null +++ b/data/referral-email.mjml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + Hey {{FirstName}}! + Are you enjoying our weekly newsletter?
Then why not share it with your friends?
+ You'll get a 15% discount
+ on your next order when a friend uses the code {{ReferalCode}}!
+ Refer a friend now + Best,
The {{CompanyName}} Team +

+
+
+
+
+
\ No newline at end of file diff --git a/data/sphero-droids.mjml b/data/sphero-droids.mjml new file mode 100644 index 0000000..8673c3b --- /dev/null +++ b/data/sphero-droids.mjml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + Hey {{FirstName}}! + Are you enjoying our weekly newsletter?
Then why not share it with your friends?
+ You'll get a 15% discount
+ on your next order when a friend uses the code {{ReferalCode}}!
+ Refer a friend now + Best,
The {{CompanyName}} Team +

+
+
+
+
+
\ No newline at end of file diff --git a/src/test/java/ch/digitalfondue/mjml4j/ComplexTemplateTests.java b/src/test/java/ch/digitalfondue/mjml4j/ComplexTemplateTests.java index 14b54f7..3a1a458 100644 --- a/src/test/java/ch/digitalfondue/mjml4j/ComplexTemplateTests.java +++ b/src/test/java/ch/digitalfondue/mjml4j/ComplexTemplateTests.java @@ -91,4 +91,14 @@ void testReceiptEmail() { testTemplate("receipt-email"); } + @Test + void testReferralEmail() { + testTemplate("referral-email"); + } + + @Test + void testSpheroDroids() { + testTemplate("sphero-droids"); + } + }