Merge pull request #8 from APayerl/small-fix #8
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: Merge to Master | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
java-version: 8.0.412+8 | |
distribution: 'adopt' | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- uses: s4u/maven-settings-action@v3.0.0 | |
with: | |
servers: | | |
[{ | |
"id": "central", | |
"username": "${{ secrets.OSSRH_USERNAME }}", | |
"password": "${{ secrets.OSSRH_TOKEN }}" | |
}] | |
- name: Bump version and push tag | |
id: version | |
uses: mathieudutour/github-tag-action@v6.2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
release_branches: master | |
create_annotated_tag: false | |
tag_prefix: '' | |
default_bump: false | |
- name: Bump version in pom.xml | |
if: steps.version.outputs.new_tag | |
run: mvn versions:set -DnewVersion=${{ steps.version.outputs.new_tag }} | |
- name: Build with Maven | |
if: steps.version.outputs.new_tag | |
run: mvn -B package --file pom.xml | |
- name: Publish to Maven Central | |
if: steps.version.outputs.new_tag | |
run: mvn deploy |