Creates a Git tag and a GitHub release, from a Git branch named according to semver; by default, it also deletes the current branch.
This action is designed to be the very last step in a publication workflow:
steps:
- uses: PUBLICATION STEP 1
- uses: PUBLICATION STEP 2
- uses: PUBLICATION STEP N
- uses: giancosta86/aurora-github/actions/tag-and-release@v4
-
This action can only be used in a workflow running while merging a pull request.
-
The following permission must be set for the action to work - especially during the branch deletion process:
contents
: write
It is already active by default - but declaring other permissions will implictly disable it.
-
GitHub Actions must have read/write permissions on the repository.
-
this action will not run on the default branch of the repository.
-
the branch name can safely start with
v
, as long asdelete-branch
is true (the default), because the tags are created after the deletion of the branch. -
the ones discussed for detect-branch-version.
-
By default, delete the current Git branch.
-
Create a new tag - for example,
vX.Y.Z
- containing the semantic version inferred from the branch name. -
Create or draft a GitHub release.
-
Optionally, create or move the tag of the major version related to the current version - for example,
vX
.
Name | Type | Description | Default value |
---|---|---|---|
draft-only |
boolean | Only draft the release | false |
delete-branch |
boolean | Delete the branch after creating the tag | true |
set-major-tag |
boolean | Create/move the vX tag to this commit (X=major version) |
false |
shell |
string | The shell used to run commands | bash |