Merge pull request #10 from sumedhsakdeo/test_tag_action #1
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: 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 -x test # temporarily disable tests to speed up dev iteration. | |
- 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: true # if true, will not push tag | |
INITIAL_VERSION: 0.5.0 # if no tags, will use this version |