A GitHub action that creates a new tag according to the Conventional Commits.
This action will automatically create a new tag and release for your repository when a pull request is merged to the default branch. It will also create a changelog entry for the new tag and release.
| Name | Description | Obligatory | Default |
|---|---|---|---|
gh-token |
A GitHub token with repo scope. This is used to create release |
required | |
tag |
Predefined tag | optional |
| Name | Description |
|---|---|
tag |
The new auto-generated tag |
ref |
The new tag ref |
name: Generate Tag
on:
push:
branches:
- main
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oobook/autonomous-tag@v1
id: tag-generation
with:
gh-token: ${{ github.token }}
# Instance for using the outputs of the action
- name: Get Tag Outputs
if: ${{ success() && steps.tag-generation.outputs.tag != '' }}
run: |
{
echo 'release_tag<<EOF'
yarn test 2>&1
echo EOF
} >> "$GITHUB_ENV"
with:
release_tag: {{ steps.tag-generation.outputs.tag }}