Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Update README.md

Update README.md #11

name: create version tag
on:
push:
branches: main
jobs:
upd-tag:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
with:
fetch-depth: 0
- name: get VERSION
run: |
echo "COMMIT_VERSION=v$(head -n 1 VERSION)" >> $GITHUB_ENV
- name: check variable
run: echo "COMMIT_VERSION = ${{ env.COMMIT_VERSION }}"
- name: get latest tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: v0.0.0
- name: compare versions
run: |
echo ${{ steps.previoustag.outputs.tag }}
echo ${{ env.COMMIT_VERSION }}
echo ${{ steps.previoustag.outputs.tag != env.COMMIT_VERSION }}
- name: create newer tag
uses: rickstaa/[email protected]
with:
tag: ${{ env.COMMIT_VERSION }}
message: "updated to new version ${{ env.COMMIT_VERSION }}"
if: ${{ steps.previoustag.outputs.tag != env.COMMIT_VERSION }} # version is updated => new working tag