Skip to content

Latest commit

 

History

History
 
 

maven-github-release

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Maven Github Release template

Opinionated sequence of steps to mark a new release of a Maven project hosted on a Github repository. It does the following:

  1. bump the version according to a given SemVer option (major, minor, patch or buildNumber)
  2. tag the repository with the new version number
  3. push changes and tags to the repository
  4. creates a Github release from the release tag

Be sure that code is checked-out using persistCredentials: true in the checkout step. Also be aware that the template commits every change on the release branch, thus be sure you only edit file you intend to include in the commit.

The template does not make any assumption on any specific maven version nor dependency to be installed. Please perform setup before including the template.

Usage

resources:
  repositories:
    - repository: templates
      type: github
      name: pagopa/azure-devops-templates
      ref: refs/tags/v1

jobs:
- checkout: self
  persistCredentials: true

- template: templates/maven-github-release/template.yaml@templates
  parameters:
    semver: 'minor' # or major or patch
    gitEmail: 'janedoe@company.com'
    gitUsername: 'JaneDoe'
    gitHubConnection: 'company_gh_connection'

Parameters

param description default
semver The rule to bump the version with
gitEmail The email of the Github user which authors the version bump commit
gitUsername The username of the Github user which authors the version bump commit
gitHubConnection The service connection used by the Azure Pipeline to connect to Github