bump grpc version #50
Workflow file for this run
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 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 |