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

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
scordio committed Oct 12, 2020
1 parent 1b538be commit d08ab30
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
workflow_dispatch:
inputs:
OSSRH_USERNAME:
description: 'OSSRH Username'
required: true
OSSRH_TOKEN:
description: 'OSSRH Token'
required: true

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Mask sensitive input
run: |
echo "::add-mask::${{ github.event.inputs.OSSRH_USERNAME }}"
echo "::add-mask::${{ github.event.inputs.OSSRH_TOKEN }}"
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Configure Git
run: |
git config --global author.email '${{ github.actor }}@users.noreply.github.com'
git config --global author.name '${{ github.actor }}'
git config --global committer.email 'actions@github.com'
git config --global committer.name 'GitHub Actions'
- name: Release package
run: |
./mvnw -B release:prepare release:perform -Dpassword=${{ secrets.GITHUB_TOKEN }}
env:
OSSRH_USERNAME: ${{ github.event.inputs.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ github.event.inputs.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
</developers>

<scm>
<developerConnection>scm:git:git@github.com:assertj/assertj-maven-parent-pom.git</developerConnection>
<connection>scm:git:git@github.com:assertj/assertj-maven-parent-pom.git</connection>
<developerConnection>scm:git:https://github.com/assertj/assertj-parent-pom.git</developerConnection>
<connection>scm:git:https://github.com/assertj/assertj-parent-pom.git</connection>
<url>https://github.com/assertj/assertj-maven-parent-pom</url>
<tag>HEAD</tag>
</scm>
Expand Down Expand Up @@ -563,6 +563,12 @@ Copyright ${inceptionYear}-${currentYear} the original author or authors.
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit d08ab30

Please sign in to comment.