Opinionated sequence of steps to mark a new release of a Maven project hosted on a Github repository. It does the following:
- bump the version according to a given SemVer option (
major
,minor
,patch
orbuildNumber
) - tag the repository with the new version number
- push changes and tags to the repository
- 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.
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'
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 |