mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-05 22:49:25 +00:00
Last touches before publishing github action.
This commit is contained in:
@@ -5,6 +5,8 @@ Project created overnight, to prove that management of semantic versioning is NO
|
||||
- [Semantic version generator](#semantic-version-generator)
|
||||
- [How does it work](#how-does-it-work)
|
||||
- [Usage](#usage)
|
||||
- [As a binary](#as-a-binary)
|
||||
- [As a github action](#as-a-github-action)
|
||||
- [Calculations example](#calculations-example)
|
||||
- [Example configuration](#example-configuration)
|
||||
- [Good to know](#good-to-know)
|
||||
@@ -17,6 +19,8 @@ Project created overnight, to prove that management of semantic versioning is NO
|
||||
|
||||
### Usage
|
||||
|
||||
#### As a binary
|
||||
|
||||
```bash
|
||||
bash$ ./semver-gen generate -r https://github.com/nextapps-de/winbox
|
||||
SEMVER 9.0.10
|
||||
@@ -42,6 +46,27 @@ Flags:
|
||||
-r, --repository string Remote repository URL. (default "https://github.com/lukaszraczylo/simple-gql-client")
|
||||
```
|
||||
|
||||
#### As a github action
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
obain-semver:
|
||||
runs-on: ubuntu-latest
|
||||
name: Generate semver
|
||||
outputs:
|
||||
RELEASE_VERSION: ${{ steps.semver.outputs.SEMVER }}
|
||||
steps:
|
||||
- name: Run
|
||||
uses: lukaszraczylo/semver-generator
|
||||
id: semver
|
||||
with:
|
||||
config_file: config.yaml
|
||||
# then...
|
||||
repository_url: https://github.com/lukaszraczylo/simple-gql-client
|
||||
# or...
|
||||
repository_local: true
|
||||
```
|
||||
|
||||
#### Calculations example
|
||||
|
||||
* 0.0.1 - PATCH - starting commit
|
||||
|
||||
+10
-6
@@ -1,23 +1,27 @@
|
||||
# action.yml
|
||||
name: 'Semantic Version Generator'
|
||||
description: 'Automagic semantic version generator'
|
||||
author: Lukasz Raczylo
|
||||
branding:
|
||||
icon: chevron-right
|
||||
color: gray-dark
|
||||
inputs:
|
||||
config-file:
|
||||
config_file:
|
||||
description: 'Configuration file'
|
||||
required: false
|
||||
repository-url:
|
||||
repository_url:
|
||||
description: 'Repository URL'
|
||||
required: false
|
||||
default: 'https://github.com/lukaszraczylo/simple-gql-client'
|
||||
repository-local:
|
||||
description: 'Use already cloned repository'
|
||||
repository_local:
|
||||
description: 'Use already cloned repository in current directory'
|
||||
required: false
|
||||
outputs:
|
||||
semantic-version: # id of output
|
||||
semver:
|
||||
description: 'Calculated semantic version'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'ghcr.io/lukaszraczylo/semver-generator:latest'
|
||||
image: 'docker://ghcr.io/lukaszraczylo/semver-generator:latest'
|
||||
args:
|
||||
- ${{ inputs.config_file }}
|
||||
- ${{ inputs.repository_url }}
|
||||
|
||||
+1
-1
@@ -26,4 +26,4 @@ fi
|
||||
|
||||
OUT_SEMVER_GEN=$(./semver-gen generate generate $FLAGS)
|
||||
OUT_SEMVER=$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')
|
||||
echo "::set-output name=semver::$OUT_SEMVER"
|
||||
echo "::set-output name=SEMVER::$OUT_SEMVER"
|
||||
Reference in New Issue
Block a user