Skip to content

fix method name capitalization after a digit, closes #8 #11

fix method name capitalization after a digit, closes #8

fix method name capitalization after a digit, closes #8 #11

name: Release pipeline
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Restore Maven repository
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Set version
id: 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
echo ::set-output name=github_tag::${GITHUB_TAG}
- 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: Github Release
uses: softprops/action-gh-release@v1
with:
files: |
./protoc-gen-java-optional/target/protoc-gen-java-optional-${{ steps.version.outputs.github_tag }}-linux-aarch_64.exe
./protoc-gen-java-optional/target/protoc-gen-java-optional-${{ steps.version.outputs.github_tag }}-linux-x86_64.exe
./protoc-gen-java-optional/target/protoc-gen-java-optional-${{ steps.version.outputs.github_tag }}-osx-aarch_64.exe
./protoc-gen-java-optional/target/protoc-gen-java-optional-${{ steps.version.outputs.github_tag }}-osx-x86_64.exe
./protoc-gen-java-optional/target/protoc-gen-java-optional-${{ steps.version.outputs.github_tag }}-windows-x86_64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
sed -i "s/protoc-gen-java-optional\/[1-9][0-9.]*)/protoc-gen-java-optional\/$GITHUB_TAG)/" README.md
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$NEW_SNAPSHOT_VERSION
- name: Commit snapshot version bump
uses: EndBug/add-and-commit@v7
with:
branch: 'master'
message: 'bump snapshot version'
author_name: github-actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com