Skip to content

Feature: added a tool for continuous emoji count #20

Feature: added a tool for continuous emoji count

Feature: added a tool for continuous emoji count #20

Workflow file for this run

name: tag
on:
push:
branches:
- 'master'
jobs:
build:
runs-on: [hs-releng-action-runner]
steps:
- name: CheckOut code
uses: actions/checkout@v2
- name: sh tst
run: |
chmod 777 echo.sh
./echo.sh
- name: Create tag
id: create_tag
run: |
git fetch --tags
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "Latest tag: $latest_tag"
first=$(echo "$latest_tag" | cut -d '.' -f 1)
mid=$(echo "$latest_tag" | cut -d '.' -f 2)
last=$(echo "$latest_tag" | cut -d '.' -f 3)
mid=$((10#$mid))
last=$((10#$last))
if [ "$last" -ge 9 ]; then
mid=$((mid + 1))
last=1
else
last=$(( last+1 ))
fi
new_tag="${first}.$mid.$last"
echo "New tag: $new_tag"
echo "::set-output name=new_tag::$new_tag"
- name: Tag check
run: |
echo "${{ steps.create_tag.outputs.new_tag }}"
- name: Tag commit
uses: tvdias/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
tag: ${{ steps.create_tag.outputs.new_tag }}