Use release-please to create releases based on conventional commit messages.
This workflow will also push git tags for the major and minor versions, this enables you to pin at the wanted level @v2, @v2.1, or the fully specified @v2.1.3.
This reusable workflow automates GitHub Releases using a two-step process:
- Create Release PR: A push to the default branch triggers the workflow, creating a release pull request with release details and an updated
CHANGELOG.md. - Publish Release: Merging the release PR triggers the workflow again to create the actual GitHub Release.
You can keep the release PR open and merge other pull requests; the release PR will automatically update to include these additional changes in the same release.
name: create release
on:
push:
branches:
- $default-branch
jobs:
release:
uses: entur/gha-meta/.github/workflows/release.yml@v1
permissions:
contents: write
pull-requests: write
issues: write| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| config_file | string | false | "release-please-config.json" |
Path to the release-please config in the repository. Defaults to release-please-config.json. Must be used together with release_type=manifest for this to have any effect |
| manifest_file | string | false | ".release-please-manifest.json" |
Path to the release-please versions manifest in the repository. Defaults to .release-please-manifest.json. Must be used together with release_type=manifest for this to have any effect |
| path | string | false | "." |
Path to the release code in the repository (where the CHANGELOG.md will be placed) |
| release_type | string | false | "simple" |
The type of release to create (simple, terraform-module, helm, maven, manifest, etc). If set to 'manifest', you must provide release-please-config.json and .release-please-manifest.json in the repository's default branch. |
| target_branch | string | false | The target branch to release against. Defaults to the repository's default branch. |
| OUTPUT | VALUE | DESCRIPTION |
|---|---|---|
| body | "${{ jobs.release-please.outputs.body }}" |
|
| release_created | "${{ jobs.release-please.outputs.releases_created }}" |
|
| releases_created | "${{ jobs.release-please.outputs.releases_created }}" |
|
| tag_name | "${{ jobs.release-please.outputs.tag_name }}" |
|
| version | "${{ jobs.release-please.outputs.version }}" |