CNB automatic release plugin that automatically manages repository tags and release version numbers.
v1.0.1Examples:
v1.0.1 → v1.0.2v1.0.99 → v1.1.0v1.99.99 → v2.0.0Use in .cnb.yml pipeline configuration:
stages:
- name: auto-release
image: docker.cnb.cool/r_r/auto-release:latest
settings:
tagFormat: "v@{version}"
dryRun: false
stringv@{version}@{version} will be replaced by the generated version number. E.g., if version is 1.2.3, v@{version} generates v1.2.3.Example:
stages:
- name: auto-release
image: docker.cnb.cool/r_r/auto-release:latest
settings:
tagFormat: "release-@{version}"
booleanfalseExample:
stages:
- name: auto-release
image: docker.cnb.cool/r_r/auto-release:latest
settings:
dryRun: true
stringstringhttps://api.cnb.cool.stringWhether dry-run or not, the following pipeline variables are output:
##[set-output auto-tag=v1.0.1]
##[set-output auto-release=v1.0.1]
Can be referenced in subsequent steps via @{auto-tag} and @{auto-release}.
main:
push:
- stages:
- name: auto-release
image: docker.cnb.cool/r_r/auto-release:latest
settings:
tagFormat: "v@{version}"
dryRun: false
exports:
auto-tag: AUTO_TAG
auto-release: AUTO_RELEASE
- name: echo env
script:
- echo "AUTO_TAG $AUTO_TAG"
- echo "AUTO_RELEASE $AUTO_RELEASE"
main:
push:
- stages:
- name: auto-release-other-repo
image: docker.cnb.cool/r_r/auto-release:latest
settings:
slug: "other-owner/other-repo"
endpoint: "https://api.cnb.cool"
token: "${OTHER_REPO_TOKEN}"
When encountering API errors or missing parameters, the plugin will exit with a non-zero status code, causing the pipeline to fail.
MIT License