mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-23 02:11:48 +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)
|
- [Semantic version generator](#semantic-version-generator)
|
||||||
- [How does it work](#how-does-it-work)
|
- [How does it work](#how-does-it-work)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
|
- [As a binary](#as-a-binary)
|
||||||
|
- [As a github action](#as-a-github-action)
|
||||||
- [Calculations example](#calculations-example)
|
- [Calculations example](#calculations-example)
|
||||||
- [Example configuration](#example-configuration)
|
- [Example configuration](#example-configuration)
|
||||||
- [Good to know](#good-to-know)
|
- [Good to know](#good-to-know)
|
||||||
@@ -17,6 +19,8 @@ Project created overnight, to prove that management of semantic versioning is NO
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
#### As a binary
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash$ ./semver-gen generate -r https://github.com/nextapps-de/winbox
|
bash$ ./semver-gen generate -r https://github.com/nextapps-de/winbox
|
||||||
SEMVER 9.0.10
|
SEMVER 9.0.10
|
||||||
@@ -42,6 +46,27 @@ Flags:
|
|||||||
-r, --repository string Remote repository URL. (default "https://github.com/lukaszraczylo/simple-gql-client")
|
-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
|
#### Calculations example
|
||||||
|
|
||||||
* 0.0.1 - PATCH - starting commit
|
* 0.0.1 - PATCH - starting commit
|
||||||
|
|||||||
+10
-6
@@ -1,23 +1,27 @@
|
|||||||
# action.yml
|
# action.yml
|
||||||
name: 'Semantic Version Generator'
|
name: 'Semantic Version Generator'
|
||||||
description: 'Automagic semantic version generator'
|
description: 'Automagic semantic version generator'
|
||||||
|
author: Lukasz Raczylo
|
||||||
|
branding:
|
||||||
|
icon: chevron-right
|
||||||
|
color: gray-dark
|
||||||
inputs:
|
inputs:
|
||||||
config-file:
|
config_file:
|
||||||
description: 'Configuration file'
|
description: 'Configuration file'
|
||||||
required: false
|
required: false
|
||||||
repository-url:
|
repository_url:
|
||||||
description: 'Repository URL'
|
description: 'Repository URL'
|
||||||
required: false
|
required: false
|
||||||
default: 'https://github.com/lukaszraczylo/simple-gql-client'
|
default: 'https://github.com/lukaszraczylo/simple-gql-client'
|
||||||
repository-local:
|
repository_local:
|
||||||
description: 'Use already cloned repository'
|
description: 'Use already cloned repository in current directory'
|
||||||
required: false
|
required: false
|
||||||
outputs:
|
outputs:
|
||||||
semantic-version: # id of output
|
semver:
|
||||||
description: 'Calculated semantic version'
|
description: 'Calculated semantic version'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'ghcr.io/lukaszraczylo/semver-generator:latest'
|
image: 'docker://ghcr.io/lukaszraczylo/semver-generator:latest'
|
||||||
args:
|
args:
|
||||||
- ${{ inputs.config_file }}
|
- ${{ inputs.config_file }}
|
||||||
- ${{ inputs.repository_url }}
|
- ${{ inputs.repository_url }}
|
||||||
|
|||||||
+1
-1
@@ -26,4 +26,4 @@ fi
|
|||||||
|
|
||||||
OUT_SEMVER_GEN=$(./semver-gen generate generate $FLAGS)
|
OUT_SEMVER_GEN=$(./semver-gen generate generate $FLAGS)
|
||||||
OUT_SEMVER=$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')
|
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