Skip to content

bump java build version #48

bump java build version

bump java build version #48

name: Release pipeline
on:
push:
tags:
- '*'
jobs:
grpcmock:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: maven
- name: Set version
run: |
export GITHUB_TAG=${GITHUB_REF##*/}
mvn versions:set -DnewVersion=$GITHUB_TAG
sed -i 's/<tag>HEAD<\/tag>/<tag>$GITHUB_TAG<\/tag>/' pom.xml
- name: Perform release
uses: samuelmeuli/action-maven-publish@v1
with:
maven_args: '-DstagingProgressTimeoutMinutes=60'
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
- name: Clean release changes
run: git add . && git stash && git stash drop
- name: Bump snapshot version
run: |
export GITHUB_TAG=${GITHUB_REF##*/}
export NEW_SNAPSHOT_VERSION=${GITHUB_TAG%%${GITHUB_TAG##*[!0-9]}}$((${GITHUB_TAG##*[!0-9]} + 1))-SNAPSHOT
sed -i "s/<version>[0-9.]*<\/version>/<version>$GITHUB_TAG<\/version>/" README.md
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$NEW_SNAPSHOT_VERSION
- name: Commit snapshot version bump
uses: EndBug/add-and-commit@v9
with:
push: 'origin HEAD:master'
message: 'bump snapshot version'
author_name: github-actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com