https://github.com/licenseware/bump-version
Bump semantic versioning patch GitHub Action
https://github.com/licenseware/bump-version
bump-version bumpversion continuous-deployment continuous-integration github-actions release-automation semantic-versioning
Last synced: about 2 months ago
JSON representation
Bump semantic versioning patch GitHub Action
- Host: GitHub
- URL: https://github.com/licenseware/bump-version
- Owner: licenseware
- License: apache-2.0
- Created: 2024-01-03T05:22:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T01:47:02.000Z (about 2 years ago)
- Last Synced: 2024-04-08T02:50:44.171Z (about 2 years ago)
- Topics: bump-version, bumpversion, continuous-deployment, continuous-integration, github-actions, release-automation, semantic-versioning
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bump Version
This GitHub Action allows you to bump the patch version of your semantic
versioned project.
## Usage
### Periodic releases at midnight
```yaml
name: ci
on:
schedule:
- cron: '30 1 */1 * *'
jobs:
scheduled-release:
if: github.event_name == 'schedule'
permissions:
contents: write # required for git tag
runs-on: ubuntu-latest
steps:
- name: Bump version
uses: licenseware/bump-version@v1
with:
release: 'true' # Publish GitHub release (truthy values: true, yes, 1)
tag: 'true' # Tag and push to repository (truthy values: true, yes, 1)
token: ${{ secrets.GITHUB_TOKEN }} # required for GitHub release
```
### Sign git tags with GPG
```yaml
name: ci
on:
schedule:
- cron: '30 1 */1 * *'
jobs:
scheduled-release:
if: github.event_name == 'schedule'
permissions:
contents: write # required for git tag
runs-on: ubuntu-latest
steps:
- name: Bump version
uses: licenseware/bump-version@v1
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-key-id: ${{ secrets.GPG_KEY_ID }}
tag: 'true'
```
### Bump with no side-effect
```yaml
name: ci
on:
push:
tags:
- v*
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Bump version
id: bump
uses: licenseware/bump-version@v1
- name: Get the new version
run: echo "The new version is ${{ steps.bump.outputs.version }}"
```
## How it works
Here's a table of input and their output when running this Action:
| Input | Output |
| ------ | ------ |
| v1 | v1.0.1 |
| v1.2 | v1.2.1 |
| v1.2.3 | v1.2.4 |