Skip to content

sardul3/gradle-version-incrementer

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradle Version Incrementer

A GitHub Action to automatically increment version numbers in Gradle build files.

Features

  • Supports SNAPSHOT versions
  • Can increment major, minor, or patch versions
  • Preserves version suffixes
  • Simple integration

Usage

name: Increment Version

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  increment-version:
    runs-on: ubuntu-latest
    steps:
     # To just add a reminder comment:
      - uses: sardul3/[email protected]

        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          file-path: 'build.gradle'
          increment-type: 'patch'
          mode: 'comment-only'
    
      # Or to actually update the file:
      - uses: sardul3/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          file-path: 'build.gradle'
          increment-type: 'patch'
          mode: 'update-file'

Inputs

Input Description Required Default
github-token already present for all workflows Yes N/A
file-path Path to the gradle file Yes N/A
increment-type Type of increment Yes N/A

Outputs

Output Description
previous-version The version before incrementing
new-version The version after incrementing

License

MIT

About

A GitHub Action to automatically increment version numbers in Gradle build files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published