Skip to content

Commit b65d015

Browse files
committed
Release 0.1.0
1 parent 1027fa1 commit b65d015

2 files changed

Lines changed: 150 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release to Maven Central
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Temurin JDK 8
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: '8'
22+
23+
- name: Import GPG key
24+
uses: crazy-max/ghaction-import-gpg@v6
25+
with:
26+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
27+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
28+
29+
- name: Configure Maven settings.xml
30+
uses: s4u/maven-settings-action@v3
31+
with:
32+
servers: |
33+
[
34+
{
35+
"id": "central",
36+
"username": "${{ secrets.CENTRAL_USERNAME }}",
37+
"password": "${{ secrets.CENTRAL_PASSWORD }}"
38+
}
39+
]
40+
41+
- name: Build and publish (Central Publishing)
42+
run: mvn -P release -DskipTests -B -V clean deploy

pom.xml

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,40 @@
66

77
<groupId>io.github.wilburhimself</groupId>
88
<artifactId>theory</artifactId>
9-
<version>1.0-SNAPSHOT</version>
9+
<version>0.1.0</version>
10+
11+
<name>Theory (Java)</name>
12+
<description>Pragmatic, annotation-driven data access library built on Spring JDBC.</description>
13+
<url>https://github.com/wilburhimself/theory_java</url>
14+
15+
<licenses>
16+
<license>
17+
<name>MIT License</name>
18+
<url>https://opensource.org/licenses/MIT</url>
19+
<distribution>repo</distribution>
20+
</license>
21+
</licenses>
22+
23+
<developers>
24+
<developer>
25+
<id>wilburhimself</id>
26+
<name>Wilbur Suero</name>
27+
<url>https://github.com/wilburhimself</url>
28+
</developer>
29+
</developers>
30+
31+
<scm>
32+
<url>https://github.com/wilburhimself/theory_java</url>
33+
<connection>scm:git:https://github.com/wilburhimself/theory_java.git</connection>
34+
<developerConnection>scm:git:ssh://git@github.com/wilburhimself/theory_java.git</developerConnection>
35+
<tag>HEAD</tag>
36+
</scm>
37+
38+
<properties>
39+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
40+
<maven.compiler.source>1.8</maven.compiler.source>
41+
<maven.compiler.target>1.8</maven.compiler.target>
42+
</properties>
1043

1144
<pluginRepositories>
1245
<pluginRepository>
@@ -31,6 +64,80 @@
3164
<scope>import</scope>
3265
</dependency>
3366
</dependencies>
67+
68+
<build>
69+
<plugins>
70+
<!-- Attach sources.jar -->
71+
<plugin>
72+
<groupId>org.apache.maven.plugins</groupId>
73+
<artifactId>maven-source-plugin</artifactId>
74+
<version>3.3.0</version>
75+
<executions>
76+
<execution>
77+
<id>attach-sources</id>
78+
<goals>
79+
<goal>jar-no-fork</goal>
80+
</goals>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
85+
<!-- Attach javadoc.jar -->
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-javadoc-plugin</artifactId>
89+
<version>3.6.3</version>
90+
<executions>
91+
<execution>
92+
<id>attach-javadocs</id>
93+
<goals>
94+
<goal>jar</goal>
95+
</goals>
96+
<configuration>
97+
<source>8</source>
98+
<failOnError>false</failOnError>
99+
</configuration>
100+
</execution>
101+
</executions>
102+
</plugin>
103+
104+
<!-- Sonatype Central Publishing (new portal) -->
105+
<plugin>
106+
<groupId>org.sonatype.central</groupId>
107+
<artifactId>central-publishing-maven-plugin</artifactId>
108+
<version>0.5.0</version>
109+
<extensions>true</extensions>
110+
<configuration>
111+
<publishingServerId>central</publishingServerId>
112+
</configuration>
113+
</plugin>
114+
</plugins>
115+
</build>
116+
117+
<profiles>
118+
<profile>
119+
<id>release</id>
120+
<build>
121+
<plugins>
122+
<!-- Sign artifacts in verify phase -->
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-gpg-plugin</artifactId>
126+
<version>3.2.4</version>
127+
<executions>
128+
<execution>
129+
<id>sign-artifacts</id>
130+
<phase>verify</phase>
131+
<goals>
132+
<goal>sign</goal>
133+
</goals>
134+
</execution>
135+
</executions>
136+
</plugin>
137+
</plugins>
138+
</build>
139+
</profile>
140+
</profiles>
34141
</dependencyManagement>
35142

36143
<dependencies>

0 commit comments

Comments
 (0)