Note
Changes in this fork allow this action to work on Gitea. I was too lazy to abstract the codebase to accommodate both clients, so this changeset can be taken to bring that functionality upstream by someone who would like to do so.
Automatically create SemVer compliant releases based on PR labels.
Assuming that a PR is tagged with a "semver-compliant" label (patch, minor or major), then this action can create a tag and a GitHub release when it is merged.
Note: to determine the base tag for the increment, this action will try to find the most recent tag complying to SemVer. No additional setup is required.
Required Branch to tag. Default "master"
.
Required Release strategy. Default "release"
(release
: creates a GitHub
release ; tag
: creates a lightweight tag ; none
: computes the next
SemVer version but does not create a release or tag).
Optional Format used to create tags. Default "v%major%.%minor%.%patch%"
.
Optional Tag to use. If left undefined, it will be computed using the tags already present in the repository.
Optional Your Gitea instance, without the /v1/api
. Defaults to https://gitea.com
The newly created tag.
# .github/workflows/release.yml
name: Release
on:
pull_request:
types: [closed]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.merged
steps:
- name: Tag
uses: 3bbbeau/gitea-semver-release-action@master
with:
release_branch: master
api_url: "https://gitea.mydomain.tld"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This library is under the MIT license.