Added dependency 'xm-commons-logging-trace' & update 'xm-common' vers… #55
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
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java#publishing-using-gradle | |
name: Autoincrement project version | |
on: | |
pull_request: | |
types: [opened,labeled,unlabeled] | |
branches: | |
- master | |
jobs: | |
increment_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Set Project Version | |
env: | |
event: ${{ github.event.action }} | |
event_label_name: ${{ github.event.label.name }} | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
if [ "$event" == "opened" ] || ([ "$event" == "unlabeled" ] && [ "$event_label_name" == "do_not_increment_version" ]) | |
then | |
./gradlew incrementProjectVersion --no-daemon | |
git commit -m "autoincrement project version" -a || echo "no changes" | |
elif [ "$event" == "labeled" ] && [ "$event_label_name" == "do_not_increment_version" ] | |
then | |
./gradlew decrementProjectVersion --no-daemon | |
git commit -m "autodecrement project version" -a || echo "no changes" | |
fi | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.head_ref }} | |