Skip to content

Minor Fixes.

Minor Fixes. #37

Workflow file for this run

name: Bump Patch and Publish (Gradle)
on:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Java and Gradle
uses: actions/setup-java@v1
with:
java-version: 17
- name: Fix gradlew permissions (optional)
run: chmod +x gradlew
- name: Get commit count using Github API
uses: actions/github@v3
id: get_commits
with:
ref: ${{ github.base_ref }} # Branch that triggered the workflow
- name: Print commit count
run: echo "## The branch has ${{ steps.get_commits.outputs.data.length }} commits"
- name: Get Version Info with Specific Commits (using custom task)
# Pass numCommits from workflow to Gradle task as an environment variable
env:
GITHUB_COMMITS: ${{ github.event.commits.length }}
run: ./gradlew getVersion
- name: Publish
env:
MAVEN_USERNAME: ${{ secrets.USERNAME }} # Reference the secret\
MAVEN_PASSWORD: ${{ secrets.PASSWORD }} # Reference the secret\
run: ./gradlew publish -DskipTests