Skip to content

Instantly share code, notes, and snippets.

@iqan
Created May 9, 2020 18:48
Show Gist options
  • Save iqan/85b1d6537215e4bbed01aa502c8862b3 to your computer and use it in GitHub Desktop.
Save iqan/85b1d6537215e4bbed01aa502c8862b3 to your computer and use it in GitHub Desktop.
jobs:
version:
name: Create version number
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --depth=10000
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.2.x'
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Create version.txt with nuGetVersion
run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt
- name: Upload version.txt
uses: actions/upload-artifact@v2
with:
name: gitversion
path: version.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment