Replace archived maven publish action #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
branches: | |
- replace-archived-maven-publish-action | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_CENTRAL_TOKEN | |
gpg-private-key: ${{ secrets.GPG_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | |
- name: Publish to Apache Maven Central | |
run: mvn deploy --activate-profiles release | |
env: | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |