util

Clone or download

Create settings.xml in setup-java step

Modified Files

name: Release
name: Release
on:
on:
push:
push:
tags:
tags:
- '*'
- '*'
jobs:
jobs:
build:
build:
name: Build
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Configure GIT
- name: Configure GIT
run: |
run: |
git config user.name "${{ github.event.head_commit.committer.name }}"
git config user.name "${{ github.event.head_commit.committer.name }}"
git config user.email "${{ github.event.head_commit.committer.email }}"
git config user.email "${{ github.event.head_commit.committer.email }}"
- name: Release artifacts
- name: Setup Java 11
run: |
uses: actions/setup-java@v1
mvn deploy -DskipTests=true -B -U -Prelease
with:
with:
java-version: 11
server-id: ossrh
server-id: ossrh
server-username: ${{ secrets.SONATYPE_USERNAME }}
server-username: MAVEN_USERNAME
server-password: ${{ secrets.SONATYPE_PASSWORD }}
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Release artifacts
run: mvn deploy -DskipTests=true -B -U -Prelease
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Update new version
- name: Update new version
run: |
run: |
TAG=${GITHUB_REF/refs\/tags\//}
TAG=${GITHUB_REF/refs\/tags\//}
newVersion=${TAG%.*}.$((${TAG##*.} + 1))
newVersion=${TAG%.*}.$((${TAG##*.} + 1))
mvn versions:set -DnewVersion=$newVersion-SNAPSHOT -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=$newVersion-SNAPSHOT -DgenerateBackupPoms=false
git commit pom.xml -m "Prepare development of $newVersion"
git commit pom.xml -m "Prepare development of $newVersion"
git push https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY} HEAD:master
git push https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY} HEAD:master