A Buildkite plugin to tag the current head with a version and push it to the repo. Also makes a release in Github if you provide the right details
Based heavily on Git Commit.
With no options, tags the $BUILDKITE_BRANCH
and pushes the tags, with a commit message like Build #4
:
steps:
- command: make
plugins:
- ailohq/git-tag#v1.0.16:
version: "v1.0.0-prod"
With all options customized:
steps:
- command: make
plugins:
- ailohq/git-tag#v1.0.16:
version: "v1.0.0-prod"
message: "Release to $ENV [$BUILDKITE_BUILD_NUMBER]"
githubtoken_env: GITHUB_TOKEN
reponame: ailohq/my-repo-name
release: true
prerelease: true
user:
- name: Bob Monkey
- email: [email protected]
-
version (required))
A tag to use in
git tag $VERSION
-
message (optional, defaults to
$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_PIPELINE_SLUG: Build $BUILDKITE_BUILD_NUMBER for $BUILDKITE_BRANCH"
)The commit message
-
githubtoken_env (optional, required to enable releases)
If provided, this will attempt to make a release. Load your token into your ENV (as per all secrets) then use
githubtoken: YOUR_ENV_NAME
-
reponame (optional, but required if you want releases)
The name of the repo, eg ailohq/my-reop-name
-
release (optional, defaults to
true
)Should a GitHub release be created?
-
prerelease (optional, defaults to
false
)Mark this as a prerelease or not.
-
draft (optional, defaults to
false
)Mark this as a draft or not.
-
user.email (optional)
If given, will configure the git user email for the repo.
-
user.name (optional)
If given, will configure the git user name for the repo.
To run the tests of this plugin, run
docker-compose run --rm tests
To run the Buildkite Plugin Linter, run
docker-compose run --rm lint
MIT (see LICENSE)