Skip to content

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

License

Notifications You must be signed in to change notification settings

PERES-Richard/maven-get-version-action

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

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 76.1%
  • Dockerfile 23.9%