https://github.com/tchupp/actions-update-semver-tags
GitHub Action for updating semver tags when a release is published
https://github.com/tchupp/actions-update-semver-tags
github-actions
Last synced: 2 months ago
JSON representation
GitHub Action for updating semver tags when a release is published
- Host: GitHub
- URL: https://github.com/tchupp/actions-update-semver-tags
- Owner: tchupp
- License: mit
- Created: 2021-08-30T01:25:01.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T20:22:20.000Z (almost 3 years ago)
- Last Synced: 2026-02-11T17:56:35.646Z (4 months ago)
- Topics: github-actions
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Actions: update-semver-tags
GitHub Action for updating semver tags when a release is published.
[SemVer (or Semantic Versioning)](https://semver.org/) is a strategy for versioning with a Major, Minor, and Patch version.
Let's say your latest release is version `v1.2.3`.
It's often convenient to have tags for `v1.2` and `v1` for loose version pinning.
This GitHub Action will update the `v1.2` and `v1` tags when a new release is published.
**[Shut up and show me the copy/paste](#examples)**
## Usage
This action can be used as follows:
```yaml
- uses: tchupp/actions-update-semver-tags@v1
```
### Assumptions
The most common cause for issues involves a mismatch in expectations.
Please read below to make sure your setup aligns with the assumptions made by this action.
#### Setup
This action expects that the repo has been checked out.
The following snippet from an example job, [which can be found below](#simple-setup).
```yaml
...
steps:
- name: Checkout
uses: actions/checkout@v2
...
```
#### Version tags
This action expects that your repo is tagged using semantic versions, ie `v1.2.3`
### Inputs
This action has no inputs.
## Examples
### Simple Setup
```yaml
name: Release Tagger
on:
push:
tags:
- 'v([0-9]+)\.([0-9]+)\.([0-9]+)'
- 'v([0-9]+)\.([0-9]+)\.([0-9]+)-(alpha|beta|rc)'
release:
types:
- published
- edited
jobs:
update-semver-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update Semver Tags
uses: tchupp/actions-update-semver-tags@v1
```