Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shotakitazawa/action-bump-calver
GitHub Action to bump the calver version up
https://github.com/shotakitazawa/action-bump-calver
actions github
Last synced: 4 days ago
JSON representation
GitHub Action to bump the calver version up
- Host: GitHub
- URL: https://github.com/shotakitazawa/action-bump-calver
- Owner: ShotaKitazawa
- License: apache-2.0
- Created: 2020-12-08T02:25:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-18T11:44:10.000Z (8 months ago)
- Last Synced: 2024-04-17T22:07:04.607Z (7 months ago)
- Topics: actions, github
- Language: TypeScript
- Homepage:
- Size: 125 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Action Bump Calver
[![release][release-badge]][release]
[![license][license-badge]][license]This is a GitHub Action to bump the given calver version up.
For example:
- `current_version=v20.01.0`, `now()=2021/01/01` -> `new_version=v21.01.0`
- `current_version=20.01.0`, `now()=2021/01/01` -> `new_version=21.01.0`
- `current_version=v21.01.0`, `now()=2021/01/01` -> `new_version=v21.01.1`It would be more useful to use this with other GitHub Actions' outputs.
## Inputs
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
|-------------------|------------------------------------------------------------------------------------------|----------|----------|---------|
| `current_version` | The current version. | `string` | `true` | `N/A` |## Outputs
| NAME | DESCRIPTION | TYPE |
|---------------|----------------------------|----------|
| `new_version` | The bumped calver version. | `string` |## Example
### Simple
```yaml
name: Push a new tagon:
push:
branches:
- masterjobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag- uses: ShotaKitazawa/action-bump-calver@v1
id: bump-calver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}- uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-calver.outputs.new_version }}
message: '${{ steps.bump-calver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'
```## Note
This action is inspired by [actions-ecosystem/action-bump-semver](https://github.com/actions-ecosystem/action-bump-semver)
[release]: https://github.com/ShotaKitazawa/action-bump-calver/releases
[release-badge]: https://img.shields.io/github/v/release/ShotaKitazawa/action-bump-calver?style=for-the-badge&logo=github[license]: LICENSE
[license-badge]: https://img.shields.io/github/license/ShotaKitazawa/action-bump-calver?style=for-the-badge