Skip to content

Commit b103833

Browse files
committed
Updated the readme.
Pulled in github workflow files from master.
1 parent fb715a6 commit b103833

File tree

4 files changed

+142
-39
lines changed

4 files changed

+142
-39
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Build
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up JDK 8
20+
uses: actions/setup-java@v2
21+
with:
22+
java-version: '8'
23+
distribution: 'adopt'
24+
cache: gradle
25+
- name: Grant execute permission for gradlew
26+
run: chmod +x gradlew
27+
- name: Build with Gradle
28+
run: ./gradlew build

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [ published ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
env:
9+
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
10+
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
with:
15+
token: ${{ secrets.GH_TOKEN }}
16+
- uses: gradle/wrapper-validation-action@v1
17+
- name: Set up JDK
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 8
21+
- name: Get latest release version number
22+
id: get_version
23+
uses: battila7/get-version-action@v2
24+
- name: Run pre-release
25+
uses: micronaut-projects/github-actions/pre-release@master
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Publish to Sonatype OSSRH
29+
env:
30+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
33+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
34+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
35+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
36+
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
37+
run: |
38+
echo "${SECRING_FILE}" | base64 -d > "${GITHUB_WORKSPACE}/secring.gpg"
39+
echo "Publishing Artifacts for $RELEASE_VERSION"
40+
(set -x; ./gradlew -Pversion="${RELEASE_VERSION}" -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
41+
- name: Bump patch version by one
42+
uses: actions-ecosystem/action-bump-semver@v1
43+
id: bump_semver
44+
with:
45+
current_version: ${{steps.get_version.outputs.version-without-v }}
46+
level: patch
47+
- name: Set version in gradle.properties
48+
env:
49+
NEXT_VERSION: ${{ steps.bump_semver.outputs.new_version }}
50+
run: |
51+
echo "Preparing next snapshot"
52+
./gradlew snapshotVersion -Pversion="${NEXT_VERSION}"
53+
- name: Commit & Push changes
54+
uses: actions-js/push@master
55+
with:
56+
github_token: ${{ secrets.GITHUB_TOKEN }}
57+
author_name: ${{ secrets.GIT_USER_NAME }}
58+
author_email: $${ secrets.GIT_USER_EMAIL }}
59+
message: 'Set version to next SNAPSHOT'
60+
- name: Export Gradle Properties
61+
uses: micronaut-projects/github-actions/export-gradle-properties@master
62+
- name: Run post-release
63+
if: success()
64+
uses: micronaut-projects/github-actions/post-release@master
65+
with:
66+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: '00 06 * * 1'
6+
7+
jobs:
8+
stale:
9+
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/stale@v3
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
stale-issue-message: 'This issue looks like it is stale and therefor it is in risk of being closed with no further action.'
20+
stale-pr-message: 'This pull request looks like it is stale and therefor it is in risk of being closed with no further action.'
21+
stale-issue-label: 'no-issue-activity'
22+
stale-pr-label: 'no-pr-activity'
23+
days-before-stale: 180

README.md

Lines changed: 25 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The Grails Asynchronous Mail plugin
22
====================================
33

4-
[![Build Status](https://travis-ci.org/kefirfromperm/grails-asynchronous-mail.svg?branch=master)](https://travis-ci.org/kefirfromperm/grails-asynchronous-mail) [![Download](https://api.bintray.com/packages/kefirsf/plugins/asynchronous-mail/images/download.svg) ](https://bintray.com/kefirsf/plugins/asynchronous-mail/_latestVersion) [![OpenHUB](https://openhub.net/p/grails-asynchronous-mail/widgets/project_thin_badge?format=gif)](https://openhub.net/p/grails-asynchronous-mail)
4+
[![Build](https://github.com/gpc/grails-asynchronous-mail/actions/workflows/build.yml/badge.svg)](https://github.com/gpc/grails-asynchronous-mail/actions/workflows/build.yml)
55

66
Description
77
-----------
@@ -11,23 +11,23 @@ database with Grails domain classes and sends them by a scheduled Quartz job. Ma
1111
the `sendAsynchronousMail` (or `sendMail`) method returning instantly, is not waiting for the mail to be actually sent. If
1212
the SMTP server isn't available, or other errors occur, the plugin can be set to retry later.
1313

14-
The plugin depends on the [quartz](https://grails.org/plugins.html#plugin/quartz) and the [mail](https://grails.org/plugins.html#plugin/mail) plugins. You also need a persistence provider plugin, [hibernate5](https://plugins.grails.org/plugin/grails/hibernate5) and [mongodb](https://plugins.grails.org/plugin/grails/mongodb) are supported.
14+
The plugin depends on the [quartz](https://plugins.grails.org/plugin/grails/quartz) and the [mail](https://plugins.grails.org/plugin/grails/mail) plugins. You also need a persistence provider plugin, [hibernate5](https://plugins.grails.org/plugin/grails/hibernate5) (or the appropriate version of hibernate for previous grails versions) and [mongodb](https://plugins.grails.org/plugin/grails/mongodb) are supported.
1515

1616
Links
1717
-----
1818

19-
* The plugin page: <https://plugins.grails.org/plugin/kefirsf/asynchronous-mail>
20-
* The VCS repository (GitHub): <https://github.com/kefirfromperm/grails-asynchronous-mail>
21-
* The issue tracker (GitHub): <https://github.com/kefirfromperm/grails-asynchronous-mail/issues>
22-
* The repository package (BinTray): <https://bintray.com/kefirsf/plugins/asynchronous-mail/>
23-
* The page at OpenHUB: <https://www.openhub.net/p/grails-asynchronous-mail>
19+
* The plugin page: <https://plugins.grails.org/plugin/grails/asynchronous-mail>
20+
* The VCS repository (GitHub): <https://github.com/gpc/grails-asynchronous-mail>
21+
* The issue tracker (GitHub): <https://github.com/gpc/grails-asynchronous-mail/issues>
2422

2523
Installation
2624
------------
2725

28-
To install just add the plugin to the plugins block of `build.gradle`. For Grails 4.0.x
26+
To install just add the plugin to the plugins block of `build.gradle`:
27+
28+
For grails 4.0.x
2929
```groovy
30-
compile "org.grails.plugins:asynchronous-mail:3.0.0"
30+
compile "io.github.gpc:asynchronous-mail:3.0.0"
3131
```
3232

3333
For Grails 3.3.x
@@ -60,7 +60,7 @@ asynchronous.mail.newSessionOnImmediateSend=false
6060
asynchronous.mail.taskPoolSize=1
6161
```
6262

63-
If you want to change this options just add options which you want to change to your configuration file `/grails-app/conf/application.groovy`.
63+
If you want to change this options just add options which you want to change to your configuration file `/grails-app/conf/application.groovy` or `/grails-app/conf/application.yml`.
6464

6565
|Option|Default|Description|
6666
|------|-------|-----------|
@@ -108,22 +108,22 @@ Next, change your sendMail call.
108108
asyncMailService.sendMail {
109109
// Mail parameters
110110
to 'john.smith@example.com'
111-
subject 'Test';
112-
html '<body><u>Test</u></body>';
113-
attachBytes 'test.txt', 'text/plain', byteBuffer;
111+
subject 'Test'
112+
html '<body><u>Test</u></body>'
113+
attachBytes 'test.txt', 'text/plain', byteBuffer
114114
115115
// Additional asynchronous parameters (optional)
116116
beginDate new Date(System.currentTimeMillis()+60000) // Starts after one minute, default current date
117117
endDate new Date(System.currentTimeMillis()+3600000) // Must be sent in one hour, default infinity
118-
maxAttemptsCount 3; // Max 3 attempts to send, default 1
119-
attemptInterval 300000; // Minimum five minutes between attempts, default 300000 ms
120-
delete true; // Marks the message for deleting after sent
121-
immediate true; // Run the send job after the message was created
122-
priority 10; // If priority is greater then message will be sent faster
118+
maxAttemptsCount 3 // Max 3 attempts to send, default 1
119+
attemptInterval 300000 // Minimum five minutes between attempts, default 300000 ms
120+
delete true // Marks the message for deleting after sent
121+
immediate true // Run the send job after the message was created
122+
priority 10 // If priority is greater then message will be sent faster
123123
}
124124
```
125125

126-
Also see the sample application at <https://github.com/kefirfromperm/grails-asynchronous-mail-sample>.
126+
Also see the sample application at <https://github.com/kefirfromperm/grails-asynchronous-mail-sample> (Grails 3).
127127

128128
The AsynchronousMailController and views
129129
----------------------------------------
@@ -139,45 +139,31 @@ Logging
139139

140140
To enable full logging for the plugin just add the following lines to `/grails-app/conf/logback.groovy`.
141141
```groovy
142-
...
142+
//...
143143
// Enable Asynchronous Mail plugin logging
144144
logger('grails.app.jobs.grails.plugin.asyncmail', TRACE, ['STDOUT'])
145145
logger('grails.app.services.grails.plugin.asyncmail', TRACE, ['STDOUT'])
146146
logger('grails.plugin.asyncmail', TRACE, ['STDOUT'])
147147
148148
// Enable Quartz plugin logging
149149
logger('grails.plugins.quartz', DEBUG, ['STDOUT'])
150-
...
150+
//...
151151
```
152152

153153
Indexes
154154
-------
155155

156-
I recommend to create an index on the `async_mail_mess.status` column. It's result of my heuristic observations. Only DBA have to create indexes anyway.
156+
A recommendation is to create an index on the `async_mail_mess.status` column. It's result of my heuristic observations. Only DBA have to create indexes anyway.
157157

158158
Issue tracking
159159
--------------
160160

161-
You can report bugs on [GitHub](https://github.com/kefirfromperm/grails-asynchronous-mail/issues?state=open).
162-
You also can ask me questions by email [kefirfromperm@gmail.com](mailto:kefirfromperm@gmail.com).
161+
You can report bugs on [GitHub](https://github.com/gpc/grails-asynchronous-mail/issues?state=open).
162+
You also can ask questions in the [Grails Community Slack Channels](https://slack.grails.org/).
163163
Please enable logs and attach them to your issue.
164164

165-
Please review this project at [OpenHUB](https://www.openhub.net/p/grails-asynchronous-mail).
166-
167165
Contribution
168166
------------
169167

170168
If you want to contribute to the plugin just open a pull request to the repository
171-
<https://github.com/kefirfromperm/grails-asynchronous-mail>.
172-
173-
Unit tests are very very sweet things. They help us to find bugs and to modify code without adding new bugs. It's very
174-
interesting to see how they work. I like to see how they work. What is better than unit tests? More unit tests!
175-
Unit tests are good!
176-
177-
And comments... Comments are good also. They are not as good as unit tests but they are definitely good. If you known
178-
Chinese or Arabic it's good. Seriously. It's awesome! But I don't speak them. So write comments in English.
179-
180-
Donation
181-
--------
182-
183-
If you want to give me a beer just send some money to <https://www.paypal.me/kefir>
169+
<https://github.com/gpc/grails-asynchronous-mail>.

0 commit comments

Comments
 (0)