Add Gitea workflow publishing the library to the public Maven registry

- .gitea/workflows/publish.yml: build, test and deploy on push to main
  (snapshot), on v* tags (release version from the tag) and manually;
  authenticates with the REGISTRY_TOKEN secret
- demo app is excluded from deployment
- pin maven-deploy-plugin and versions-maven-plugin
- README: how to consume the package

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G71TQ5jDETVwdUJxGAwaiT
This commit is contained in:
Claude committed 2026-10-12 04:17:52 +00:00
1 parent 34191f91dd
commit 8580cc6c4e
4 files changed
+84

No files matched your search

+23
View File
@@ -19,6 +19,29 @@ mvn verify
| `mailsender-pgp-spring-boot-starter` | dependency bundle for applications |
| `mailsender-demo` | sample app that sends test mails |
## Installation
Releases and snapshots are published to the Gitea Maven registry of the `public` owner by
`.gitea/workflows/publish.yml` (push to `main` → `-SNAPSHOT`, tag `v1.2.3` → `1.2.3`):
```xml
<repositories>
<repository>
<id>gitea-public</id>
<url>https://YOUR-GITEA-HOST/api/packages/public/maven</url>
</repository>
</repositories>
<dependency>
<groupId>pro.thinhha.mailsender</groupId>
<artifactId>mailsender-pgp-spring-boot-starter</artifactId>
<version>0.1.0</version>
</dependency>
```
If the packages are not public, add a `<server>` with id `gitea-public` and a token with `read:package` scope to
your `settings.xml`.
## Usage
Add `pro.thinhha.mailsender:mailsender-pgp-spring-boot-starter`, configure `spring.mail.*` as usual, and send