Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.

Commit d08ab30

Browse files
committed
Add release workflow
1 parent 1b538be commit d08ab30

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
OSSRH_USERNAME:
7+
description: 'OSSRH Username'
8+
required: true
9+
OSSRH_TOKEN:
10+
description: 'OSSRH Token'
11+
required: true
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Mask sensitive input
19+
run: |
20+
echo "::add-mask::${{ github.event.inputs.OSSRH_USERNAME }}"
21+
echo "::add-mask::${{ github.event.inputs.OSSRH_TOKEN }}"
22+
- uses: actions/checkout@v2
23+
- name: Set up Maven Central Repository
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: 11
27+
server-id: ossrh
28+
server-username: OSSRH_USERNAME
29+
server-password: OSSRH_TOKEN
30+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
31+
- name: Configure Git
32+
run: |
33+
git config --global author.email '${{ github.actor }}@users.noreply.github.com'
34+
git config --global author.name '${{ github.actor }}'
35+
git config --global committer.email 'actions@github.com'
36+
git config --global committer.name 'GitHub Actions'
37+
- name: Release package
38+
run: |
39+
./mvnw -B release:prepare release:perform -Dpassword=${{ secrets.GITHUB_TOKEN }}
40+
env:
41+
OSSRH_USERNAME: ${{ github.event.inputs.OSSRH_USERNAME }}
42+
OSSRH_TOKEN: ${{ github.event.inputs.OSSRH_TOKEN }}
43+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
</developers>
8585

8686
<scm>
87-
<developerConnection>scm:git:git@github.com:assertj/assertj-maven-parent-pom.git</developerConnection>
88-
<connection>scm:git:git@github.com:assertj/assertj-maven-parent-pom.git</connection>
87+
<developerConnection>scm:git:https://github.com/assertj/assertj-parent-pom.git</developerConnection>
88+
<connection>scm:git:https://github.com/assertj/assertj-parent-pom.git</connection>
8989
<url>https://github.com/assertj/assertj-maven-parent-pom</url>
9090
<tag>HEAD</tag>
9191
</scm>
@@ -563,6 +563,12 @@ Copyright ${inceptionYear}-${currentYear} the original author or authors.
563563
<goals>
564564
<goal>sign</goal>
565565
</goals>
566+
<configuration>
567+
<gpgArguments>
568+
<arg>--pinentry-mode</arg>
569+
<arg>loopback</arg>
570+
</gpgArguments>
571+
</configuration>
566572
</execution>
567573
</executions>
568574
</plugin>

0 commit comments

Comments
 (0)