Skip to content
star

GitHub Action

Setup Groovy

v2.0.2 Latest version

Setup Groovy

star

Setup Groovy

Sets up Groovy for Github Actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup Groovy

uses: WtfJoke/[email protected]

Learn more about this action in WtfJoke/setup-groovy

Choose a version

CI Security Rating Maintainability Rating Bugs Code Smells Technical Debt Lines of Code codecov

The wtfjoke/setup-groovy action is a JavaScript action that sets up Apache Groovy in your GitHub Actions workflow. by:

  • Downloading a requested version of Groovy and adding it to the PATH.

🔧 Usage

See action.yml

This action can be run on ubuntu-latest, windows-latest, and macos-latest GitHub Actions runners.

steps:
  - uses: wtfjoke/setup-groovy@v2
    with:
      groovy-version: '4.x'
  - run: groovy --version

📊 Supported version syntax

If there is a specific version of Groovy that you need and you don't want to worry about any potential breaking changes due to patch updates (going from 4.0.8 to 4.0.9 for example), you should specify the exact major, minor, and patch version (such as 4.0.9):

steps:
  - uses: actions/checkout@v3
  - uses: wtfjoke/setup-groovy@v2
    with:
      groovy-version: '4.0.9'
  - run: groovy HelloWorld.groovy

You can specify only a major and minor version if you are okay with the most recent patch version being used:

steps:
  - uses: actions/checkout@v3
  - uses: wtfjoke/setup-groovy@v2
    with:
      groovy-version: '4.0'
  - run: groovy HelloWorld.groovy

You can also use ranges that are specified in semver, for example a hyphen-range:

steps:
  - uses: actions/checkout@v3
  - uses: wtfjoke/setup-groovy@v2
    with:
      groovy-version: '>=3.x <4.0.0'
  - run: groovy HelloWorld.groovy