Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/actions-ecosystem/action-bump-semver
⏫ GitHub Action to bump the semver version up
https://github.com/actions-ecosystem/action-bump-semver
actions github semver
Last synced: 25 days ago
JSON representation
⏫ GitHub Action to bump the semver version up
- Host: GitHub
- URL: https://github.com/actions-ecosystem/action-bump-semver
- Owner: actions-ecosystem
- License: apache-2.0
- Created: 2020-05-04T23:46:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-27T01:26:03.000Z (11 months ago)
- Last Synced: 2024-11-25T15:59:36.262Z (about 1 month ago)
- Topics: actions, github, semver
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/actions-ecosystem-bump-semver
- Size: 336 KB
- Stars: 52
- Watchers: 3
- Forks: 22
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Action Bump Semver
[![actions-workflow-test][actions-workflow-test-badge]][actions-workflow-test]
[![release][release-badge]][release]
[![license][license-badge]][license]This is a GitHub Action to bump the given semver version up.
For example:
- `current_version=v1.2.3`, `level=major` -> `new_version=v2.0.0`
- `current_version=1.2.3`, `level=major` -> `new_version=2.0.0`
- `current_version=v1.2.3`, `level=minor` -> `new_version=v1.3.0`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` |
| `level` | A semver update level `{major, premajor, minor, preminor, patch, prepatch, prerelease}`. | `string` | `false` | `minor` |## Outputs
| NAME | DESCRIPTION | TYPE |
|---------------|----------------------------|----------|
| `new_version` | The bumped semver version. | `string` |## Example
### Simple
```yaml
name: Push a new tag with minor updateon:
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: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: minor- uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}
message: '${{ steps.bump-semver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'
```For a further practical example, see [.github/workflows/release.yml](.github/workflows/release.yml).
## License
Copyright 2020 The Actions Ecosystem Authors.
Action Bump Semver is released under the [Apache License 2.0](./LICENSE).
[actions-workflow-test]: https://github.com/actions-ecosystem/action-bump-semver/actions?query=workflow%3ATest
[actions-workflow-test-badge]: https://img.shields.io/github/workflow/status/actions-ecosystem/action-bump-semver/Test?label=Test&style=for-the-badge&logo=github[release]: https://github.com/actions-ecosystem/action-bump-semver/releases
[release-badge]: https://img.shields.io/github/v/release/actions-ecosystem/action-bump-semver?style=for-the-badge&logo=github[license]: LICENSE
[license-badge]: https://img.shields.io/github/license/actions-ecosystem/action-bump-semver?style=for-the-badge