Skip to content

Added version tagging for master commits #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/tag-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: tag-release
on:
push:
# Tag a release upon pushing code to the master branch
branches:
- master
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: Get Short SHA Of Last Commit
id: short
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: Bump Version And Push Tag
uses: anothrNick/[email protected]
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
INITIAL_VERSION: 1.0.0
WITH_V: true

- name: Print Results
run: echo "Tagged Commit ${{ steps.short.outputs.sha_short }} With Tag ${{ steps.tag.outputs.tag }}"