Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geritol/match-tag-to-package-version
A Github action that makes sure that your git tag and version in package.json match
https://github.com/geritol/match-tag-to-package-version
github-action versioning
Last synced: 3 months ago
JSON representation
A Github action that makes sure that your git tag and version in package.json match
- Host: GitHub
- URL: https://github.com/geritol/match-tag-to-package-version
- Owner: geritol
- Created: 2020-04-21T12:57:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T20:30:07.000Z (almost 2 years ago)
- Last Synced: 2024-07-01T14:32:12.026Z (4 months ago)
- Topics: github-action, versioning
- Language: TypeScript
- Homepage:
- Size: 744 KB
- Stars: 9
- Watchers: 4
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![geritol/match-tag-to-package-version user count](https://img.shields.io/endpoint?url=https%3A%2F%2Factions.geritol.tech%2Fapi%2Fgeritol%2Fmatch-tag-to-package-version%3Fformat%3Dshields.io&cacheSeconds=3600)](https://actions.geritol.tech/geritol/match-tag-to-package-version)
# match-tag-to-package-version
A github action that makes sure that git tag and version in package.json match
# Usage
You can safeguard that your package.json and your git tag matches using this action and proceed to release after the check successfully ran.
```yaml
name: Releaseon:
push:
tags:
- "*"jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master- name: match-tag-to-package-version
id: match-tag-to-package-version
uses: geritol/[email protected]
with:
TAG_PREFIX: v # Optional, default prefix is ""
# TAG_PREFIX may also be defined under the 'env' key.
```The action outputs package.json version as `PACKAGE_VERSION` and the tag (without 'refs/tags/') as `TAG_VERSION`.
Eg. use it as `steps.match-tag-to-package-version.outputs.PACKAGE_VERSION` in other steps.