diff --git a/README.md b/README.md index e2fa24d..d23f578 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yml b/action.yml index 0a4da89..76f315d 100644 --- a/action.yml +++ b/action.yml @@ -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 }} diff --git a/entrypoint.sh b/entrypoint.sh index 998c818..8c617f4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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" \ No newline at end of file +echo "::set-output name=SEMVER::$OUT_SEMVER" \ No newline at end of file