Skip to content

Merge pull request #11 from sumedhsakdeo/enable_tag_action #2

Merge pull request #11 from sumedhsakdeo/enable_tag_action

Merge pull request #11 from sumedhsakdeo/enable_tag_action #2

name: Gradle Build, Tag, and Publish OpenHouse
on:
push:
branches:
- main
jobs:
build-gradle-project:
name: Build tagged commit
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
distribution: 'microsoft'
java-version: '1.8'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew clean build
- name: Bump version and push tag
if: ${{ success() }}
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true # prefix for tag "v"
DEFAULT_BUMP: patch # major, minor, patch
DRY_RUN: false # if true, will not push tag
INITIAL_VERSION: 0.5.0 # if no tags, will use this version