Skip to content

Commit 022133a

Browse files
valerenajfuss
andauthored
chore: Initial release workflow (aws#12)
Initial release workflow Co-authored-by: Jacob Fuss <[email protected]>
1 parent aaf0e5b commit 022133a

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
releaseVersion:
6+
description: "Version to use for the release."
7+
required: true
8+
default: "X.Y.Z"
9+
developmentVersion:
10+
description: "Version to use for further development"
11+
required: true
12+
default: "X.Y.Z-SNAPSHOT"
13+
jobs:
14+
release:
15+
environment: release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Configure Git User # may be removed after https://github.com/actions/checkout/issues/13 is resolved
20+
run: |
21+
git config user.email "${{ github.actor }}@users.noreply.github.com"
22+
git config user.name "${{ github.actor }}"
23+
- name: Set up Maven
24+
uses: actions/setup-java@v3
25+
with:
26+
distribution: 'corretto'
27+
java-version: 11
28+
server-id: ossrh
29+
server-username: MAVEN_USERNAME
30+
server-password: MAVEN_PASSWORD
31+
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import
32+
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
33+
- name: Release and publish package
34+
run: mvn -Prelease-sign-artifacts clean deploy
35+
env:
36+
MAVEN_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
37+
MAVEN_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
38+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

pom.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
<id>ossrh</id>
3939
<url>https://aws.oss.sonatype.org/content/repositories/snapshots</url>
4040
</snapshotRepository>
41+
<repository>
42+
<id>ossrh</id>
43+
<name>Nexus Release Repository</name>
44+
<url>https://aws.oss.sonatype.org/content/repositories/releases</url>
45+
</repository>
4146
</distributionManagement>
4247

4348
<licenses>
@@ -156,6 +161,38 @@
156161
</activation>
157162
<build>
158163
<plugins>
164+
<plugin>
165+
<groupId>org.apache.maven.plugins</groupId>
166+
<artifactId>maven-javadoc-plugin</artifactId>
167+
<executions>
168+
<execution>
169+
<id>attach-javadoc</id>
170+
<goals>
171+
<goal>jar</goal>
172+
</goals>
173+
</execution>
174+
</executions>
175+
</plugin>
176+
<plugin>
177+
<groupId>org.apache.maven.plugins</groupId>
178+
<artifactId>maven-source-plugin</artifactId>
179+
<executions>
180+
<execution>
181+
<id>attach-source</id>
182+
<goals>
183+
<goal>jar</goal>
184+
</goals>
185+
</execution>
186+
</executions>
187+
</plugin>
188+
<plugin>
189+
<artifactId>maven-clean-plugin</artifactId>
190+
<version>3.1.0</version>
191+
</plugin>
192+
<plugin>
193+
<artifactId>maven-jar-plugin</artifactId>
194+
<version>3.2.0</version>
195+
</plugin>
159196
<plugin>
160197
<groupId>org.apache.maven.plugins</groupId>
161198
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)