From 6a5567e664577400fdfd9944f043224cc04c36d1 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 22 Nov 2019 19:41:30 +0200 Subject: [PATCH] updates to readme --- .github/workflows/ci.yml | 6 +++++- README.md | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaf529f..f14d9ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,16 @@ jobs: os: [windows-latest, ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v1 + - name: Fetch tags and master for GitVersion + run: | + git fetch --tags + git branch --create-reflog master origin/master - name: Install GitVersion uses: ./setup with: versionSpec: '5.1.x' - name: Use GitVersion - id: gitversion + id: gitversion # step id used as reference for output values uses: ./execute - run: | echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}" diff --git a/README.md b/README.md index 32a4af6..bda0b88 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,43 @@ # use-gitversion + +![GitVersion](https://raw.githubusercontent.com/GitTools/GitVersion/master/docs/img/package_icon.png "GitVersion") + Github Action that installs and uses the GitVersion tool + +## Usage + +See [setup](setup/action.yml) and [usage](execute/action.yml) + +## Dependency + +There are two step dependencies that are required in your workflow before running this action. You must checkout your Git repository and then fetch the master branch and tags. + +```yaml +steps: +- name: Checkout + uses: actions/checkout@v1 +- name: Fetch tags and master for GitVersion + run: | + git fetch --tags + git branch --create-reflog master origin/master +``` + +Basic: + +```yaml +steps: +- uses: actions/checkout@v1 +- name: Fetch tags and master for GitVersion + run: | + git fetch --tags + git branch --create-reflog master origin/master +- name: Install GitVersion + uses: gittools/use-gitversion/setup@v0.1 + with: + versionSpec: '5.1.x' +- name: Use GitVersion + id: gitversion # step id used as reference for output values + uses: gittools/use-gitversion/execute@v0.1 +- run: | + echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}" +```