PERES-Richard / maven-get-version-action

GitHub Action to get the Maven version of a pom.xml file using mvn evaluate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maven-get-version-action

This Github Action retrieves the pom version from the pom.xml file and sets the version in the version output value usable in your workflow file which can be used in a following step by using ${{ steps.pom-version.outputs.version }}. Use Java 11 (Temurin).

Example

To use this action in your project, use the following:

- name: get-pom-version
  id: pom-version
  uses: PERES-Richard/maven-get-version-action@v3.0.0

- name: Print Maven POM project version
  run: echo "version = ${{ steps.pom-version.outputs.version }}"

Params

- name: get-pom-version
  id: pom-version
  uses: PERES-Richard/maven-get-version-action@v3.0.0
  with:
    path: "mavenproject/<yourproject>"  # Optional: pom.xml relative folder path
    args: "-s ~/.m2/settings.xml"       # Optional: maven additional args to run 

About

GitHub Action to get the Maven version of a pom.xml file using mvn evaluate

License:MIT License


Languages

Language:Shell 76.1%Language:Dockerfile 23.9%