Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nomonosound/gitversion-helper-action
https://github.com/nomonosound/gitversion-helper-action
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nomonosound/gitversion-helper-action
- Owner: nomonosound
- License: mit
- Created: 2022-10-28T11:20:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T10:50:46.000Z (9 months ago)
- Last Synced: 2024-04-30T12:27:56.133Z (9 months ago)
- Language: JavaScript
- Size: 210 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitVersion-Helper-Action
Helper that can be used to enforce tag-based versioning if a version exists, and otherwise use gitversion's calculated version.## Build it:
`npm run build`## Use it in a github action
```yaml
---
name: build
on:
push:
jobs:
calculate-version:
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semver }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'- name: Determine Version
id: gitversion_initial
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true- name: Calculate final version
id: gitversion
uses: nomonosound/[email protected]
with:
semver: ${{ steps.gitversion_initial.outputs.semVer }}
shortsha: ${{ steps.gitversion_initial.outputs.ShortSha }}
useTagIfExists: true
githubRef: ${{ github.ref }}build-and-push-image:
runs-on: ubuntu-latest
needs:
- calculate-version
env:
SEMVER: ${{ needs.calculate-version.outputs.semVer }}
steps:
- run: echo "{{ env.SEMVER }}"
```