https://github.com/dolittle/increment-version-action
https://github.com/dolittle/increment-version-action
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dolittle/increment-version-action
- Owner: dolittle
- License: mit
- Created: 2020-06-17T13:24:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T01:26:42.000Z (over 2 years ago)
- Last Synced: 2025-03-29T10:33:27.286Z (about 2 months ago)
- Language: TypeScript
- Size: 274 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action - Increment Version
This GitHub action increments a given version.
### Pre requisites
Create a workflow `.yml` file in your `.github/workflows` directory. An [example workflow](#example-workflow) is available below.For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)
### Inputs
- `version` (required): The version to increment
- `release-type` (required): The release type to increment the version with
- `prerelease-identifier`: The prerelease identifier to use when incrementing### Outputs
- `previous-version`: The inputted version
- `next-version`: The incremented version### Example Workflow
```yaml
on:
push:
branches:
- '**'
pull_request:
types: [closed]name: Increment Version
jobs:
context:
name: Increment Version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Increment version
uses: dolittle/increment-version-action@v2
with:
version: 2.0.0
release-type: minor```
### Example Workflow - Increment to new minor prerelease
```yaml
on:
push:
branches:
- '**'
pull_request:
types: [closed]name: Increment Version
jobs:
context:
name: Increment Version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Increment version
uses: dolittle/increment-version-action@v2
with:
version: 2.0.0
release-type: preminor
prerelease-identifier: alpha```
## Contributing
We're always open for contributions and bug fixes!### Pre requisites
- node <= 12
- yarn
- git